provider/aws: Breaking change - Trim off quotes for aws_s3_bucket_object.etag

This commit is contained in:
Radek Simko 2016-02-23 12:13:19 +00:00
parent 79281c2502
commit 70f045e46e
1 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"io" "io"
"log" "log"
"os" "os"
"strings"
"github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/schema"
"github.com/mitchellh/go-homedir" "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) 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) d.SetId(key)
return nil return nil
} }