driftctl/pkg/resource/aws/aws_db_instance.go

24 lines
835 B
Go
Raw Normal View History

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
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) {
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"})
val.DeleteIfDefault("CharacterSetName")
2021-04-26 13:42:14 +00:00
})
}