provider/aws: SQS use raw policy string if compact fails (#6724)

This commit is contained in:
Clint 2016-05-24 10:38:32 -05:00
parent a5d8ddc595
commit 171c1e39d2
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ func resourceAwsSqsQueue() *schema.Resource {
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 Queue")
return ""
log.Printf("[WARN] Error compacting JSON for Policy in SNS Queue, using raw string: %s", err)
return s
}
return buffer.String()
},