package aws import ( "github.com/snyk/driftctl/enumeration/resource" "github.com/snyk/driftctl/enumeration/resource/aws" "github.com/snyk/driftctl/pkg/helpers" ) func initSnsTopicPolicyMetaData(resourceSchemaRepository resource.SchemaRepositoryInterface) { resourceSchemaRepository.SetNormalizeFunc(aws.AwsSnsTopicPolicyResourceType, func(res *resource.Resource) { val := res.Attrs val.SafeDelete([]string{"owner"}) jsonString, err := helpers.NormalizeJsonString((*val)["policy"]) if err != nil { return } _ = val.SafeSet([]string{"policy"}, jsonString) }) }