From 70f045e46e40235f669dd7397788ce21db7b51ae Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 23 Feb 2016 12:13:19 +0000 Subject: [PATCH] provider/aws: Breaking change - Trim off quotes for aws_s3_bucket_object.etag --- builtin/providers/aws/resource_aws_s3_bucket_object.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_s3_bucket_object.go b/builtin/providers/aws/resource_aws_s3_bucket_object.go index ca10cf4cb..8cb7d277f 100644 --- a/builtin/providers/aws/resource_aws_s3_bucket_object.go +++ b/builtin/providers/aws/resource_aws_s3_bucket_object.go @@ -6,6 +6,7 @@ import ( "io" "log" "os" + "strings" "github.com/hashicorp/terraform/helper/schema" "github.com/mitchellh/go-homedir" @@ -144,7 +145,9 @@ func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) erro return fmt.Errorf("Error putting object in S3 bucket (%s): %s", bucket, err) } - d.Set("etag", resp.ETag) + // See https://forums.aws.amazon.com/thread.jspa?threadID=44003 + d.Set("etag", strings.Trim(*resp.ETag, `"`)) + d.SetId(key) return nil }