Merge pull request #329 from cloudskiff/fix_aws_db_instance
Fix false positive drift on aws_db_instancemain
commit
14cb69a9bd
|
@ -34,7 +34,7 @@ type AwsDbInstance struct {
|
||||||
InstanceClass *string `cty:"instance_class"`
|
InstanceClass *string `cty:"instance_class"`
|
||||||
Iops *int `cty:"iops"`
|
Iops *int `cty:"iops"`
|
||||||
KmsKeyId *string `cty:"kms_key_id" computed:"true"`
|
KmsKeyId *string `cty:"kms_key_id" computed:"true"`
|
||||||
LatestRestorableTime *string `cty:"latest_restorable_time" computed:"true"`
|
LatestRestorableTime *string `cty:"latest_restorable_time" computed:"true" diff:"-"`
|
||||||
LicenseModel *string `cty:"license_model" computed:"true"`
|
LicenseModel *string `cty:"license_model" computed:"true"`
|
||||||
MaintenanceWindow *string `cty:"maintenance_window" computed:"true"`
|
MaintenanceWindow *string `cty:"maintenance_window" computed:"true"`
|
||||||
MaxAllocatedStorage *int `cty:"max_allocated_storage"`
|
MaxAllocatedStorage *int `cty:"max_allocated_storage"`
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package aws
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/cloudskiff/driftctl/pkg/resource"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (r *AwsDbInstance) NormalizeForState() (resource.Resource, error) {
|
||||||
|
if r.SnapshotIdentifier != nil && *r.SnapshotIdentifier == "" {
|
||||||
|
r.SnapshotIdentifier = nil
|
||||||
|
}
|
||||||
|
if r.AllowMajorVersionUpgrade != nil && !*r.AllowMajorVersionUpgrade {
|
||||||
|
r.AllowMajorVersionUpgrade = nil
|
||||||
|
}
|
||||||
|
if r.ApplyImmediately != nil && !*r.ApplyImmediately {
|
||||||
|
r.ApplyImmediately = nil
|
||||||
|
}
|
||||||
|
return r, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *AwsDbInstance) NormalizeForProvider() (resource.Resource, error) {
|
||||||
|
return r, nil
|
||||||
|
}
|
Loading…
Reference in New Issue