driftctl/pkg/resource/aws/aws_s3_bucket.go

21 lines
657 B
Go

package aws
import (
"github.com/cloudskiff/driftctl/pkg/resource"
)
const AwsS3BucketResourceType = "aws_s3_bucket"
func initAwsS3BucketMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) {
resourceSchemaRepository.UpdateSchema(AwsS3BucketResourceType, map[string]func(attributeSchema *resource.AttributeSchema){
"policy": func(attributeSchema *resource.AttributeSchema) {
attributeSchema.JsonString = true
},
})
resourceSchemaRepository.SetNormalizeFunc(AwsS3BucketResourceType, func(res *resource.Resource) {
val := res.Attrs
val.SafeDelete([]string{"force_destroy"})
val.SafeDelete([]string{"bucket_prefix"})
})
}