From feb04c24befdd188c784b5ab65433e4e66c296cc Mon Sep 17 00:00:00 2001 From: clint shryock Date: Tue, 17 May 2016 15:57:15 -0500 Subject: [PATCH] provider/aws: SQS use raw policy string if compact fails --- builtin/providers/aws/resource_aws_sqs_queue.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_sqs_queue.go b/builtin/providers/aws/resource_aws_sqs_queue.go index 7d7733bf323a..b253a833fe1d 100644 --- a/builtin/providers/aws/resource_aws_sqs_queue.go +++ b/builtin/providers/aws/resource_aws_sqs_queue.go @@ -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() },