Fixes the bug where sns delivery policy get always recreated (see https://github.com/hashicorp/terraform/issues/14024)

This commit is contained in:
Dejan Golja 2017-04-28 13:18:12 +10:00
parent 990b6759f1
commit 7c4a242661
1 changed files with 9 additions and 3 deletions

View File

@ -55,9 +55,15 @@ func resourceAwsSnsTopic() *schema.Resource {
},
},
"delivery_policy": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Type: schema.TypeString,
Optional: true,
ForceNew: false,
ValidateFunc: validateJsonString,
DiffSuppressFunc: suppressEquivalentJsonDiffs,
StateFunc: func(v interface{}) string {
json, _ := normalizeJsonString(v)
return json
},
},
"arn": &schema.Schema{
Type: schema.TypeString,