Fix false positive drift on aws_db_instance
parent
9fd09d9710
commit
64ee24ced8
|
@ -34,7 +34,7 @@ type AwsDbInstance struct {
|
|||
InstanceClass *string `cty:"instance_class"`
|
||||
Iops *int `cty:"iops"`
|
||||
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"`
|
||||
MaintenanceWindow *string `cty:"maintenance_window" computed:"true"`
|
||||
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