actually use the value

This commit is contained in:
clint shryock 2015-11-06 14:06:50 -06:00
parent 274781224e
commit 15533dca09
1 changed files with 3 additions and 2 deletions

View File

@ -46,10 +46,11 @@ func resourceAwsSnsTopic() *schema.Resource {
Optional: true,
Computed: true,
StateFunc: func(v interface{}) string {
if v == nil {
s, ok := v.(string)
if !ok || s == "" {
return ""
}
jsonb := []byte{}
jsonb := []byte(s)
buffer := new(bytes.Buffer)
if err := json.Compact(buffer, jsonb); err != nil {
log.Printf("[WARN] Error compacting JSON for Policy in SNS Topic")