From 171c1e39d283e4586a1f238c6befea1da35c61b6 Mon Sep 17 00:00:00 2001 From: Clint Date: Tue, 24 May 2016 10:38:32 -0500 Subject: [PATCH] provider/aws: SQS use raw policy string if compact fails (#6724) --- 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 7d7733bf3..b253a833f 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() },