2020-12-09 15:31:34 +00:00
|
|
|
package aws
|
|
|
|
|
2021-04-26 13:42:14 +00:00
|
|
|
import (
|
|
|
|
"github.com/cloudskiff/driftctl/pkg/resource"
|
|
|
|
)
|
2021-03-25 11:13:52 +00:00
|
|
|
|
2020-12-09 15:31:34 +00:00
|
|
|
const AwsDbInstanceResourceType = "aws_db_instance"
|
|
|
|
|
2021-04-26 13:42:14 +00:00
|
|
|
func initAwsDbInstanceMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
|
2021-08-09 14:03:04 +00:00
|
|
|
resourceSchemaRepository.SetNormalizeFunc(AwsDbInstanceResourceType, func(res *resource.Resource) {
|
2021-05-24 15:19:06 +00:00
|
|
|
val := res.Attrs
|
2021-04-26 13:42:14 +00:00
|
|
|
val.SafeDelete([]string{"delete_automated_backups"})
|
|
|
|
val.SafeDelete([]string{"final_snapshot_identifier"})
|
|
|
|
val.SafeDelete([]string{"latest_restorable_time"})
|
|
|
|
val.SafeDelete([]string{"password"})
|
|
|
|
val.SafeDelete([]string{"skip_final_snapshot"})
|
|
|
|
val.SafeDelete([]string{"timeouts"})
|
2021-05-04 13:03:17 +00:00
|
|
|
val.SafeDelete([]string{"snapshot_identifier"})
|
|
|
|
val.SafeDelete([]string{"allow_major_version_upgrade"})
|
|
|
|
val.SafeDelete([]string{"apply_immediately"})
|
2021-05-31 14:07:12 +00:00
|
|
|
val.DeleteIfDefault("CharacterSetName")
|
2021-04-26 13:42:14 +00:00
|
|
|
})
|
|
|
|
}
|