Issue 637: Fix false positive for aws_sns_topic/policy

main
Louis TOUSSAINT 2021-06-17 15:39:26 +02:00
parent fcfdb054da
commit 2ddb8191ab
2 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,10 @@ func initSnsTopicMetaData(resourceSchemaRepository resource.SchemaRepositoryInte
val.DeleteIfDefault("lambda_success_feedback_sample_rate")
val.DeleteIfDefault("http_success_feedback_sample_rate")
val.DeleteIfDefault("application_success_feedback_sample_rate")
val.DeleteIfDefault("firehose_failure_feedback_role_arn")
val.DeleteIfDefault("firehose_success_feedback_role_arn")
val.SafeDelete([]string{"name_prefix"})
val.SafeDelete([]string{"owner"})
})
resourceSchemaRepository.SetHumanReadableAttributesFunc(AwsSnsTopicResourceType, func(res *resource.AbstractResource) map[string]string {
val := res.Attrs

View File

@ -16,6 +16,7 @@ func initSnsTopicPolicyMetaData(resourceSchemaRepository resource.SchemaReposito
resourceSchemaRepository.SetNormalizeFunc(AwsSnsTopicPolicyResourceType, func(res *resource.AbstractResource) {
val := res.Attrs
val.SafeDelete([]string{"owner"})
jsonString, err := helpers.NormalizeJsonString((*val)["policy"])
if err != nil {
return