From 68aebee1e583827cff486c322d0b450ceb52e98e Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 11 May 2017 18:35:50 +0200 Subject: [PATCH] provider/aws: Fix Content-Encoding for S3 object acc test (#14400) --- .../providers/aws/data_source_aws_s3_bucket_object_test.go | 4 ++-- .../docs/providers/aws/r/s3_bucket_object.html.markdown | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/data_source_aws_s3_bucket_object_test.go b/builtin/providers/aws/data_source_aws_s3_bucket_object_test.go index a0a00f390..b4693da54 100644 --- a/builtin/providers/aws/data_source_aws_s3_bucket_object_test.go +++ b/builtin/providers/aws/data_source_aws_s3_bucket_object_test.go @@ -149,7 +149,7 @@ func TestAccDataSourceAWSS3BucketObject_allParams(t *testing.T) { resource.TestCheckNoResourceAttr("data.aws_s3_bucket_object.obj", "body"), resource.TestCheckResourceAttr("data.aws_s3_bucket_object.obj", "cache_control", "no-cache"), resource.TestCheckResourceAttr("data.aws_s3_bucket_object.obj", "content_disposition", "attachment"), - resource.TestCheckResourceAttr("data.aws_s3_bucket_object.obj", "content_encoding", "gzip"), + resource.TestCheckResourceAttr("data.aws_s3_bucket_object.obj", "content_encoding", "identity"), resource.TestCheckResourceAttr("data.aws_s3_bucket_object.obj", "content_language", "en-GB"), // Encryption is off resource.TestCheckResourceAttr("data.aws_s3_bucket_object.obj", "server_side_encryption", ""), @@ -284,7 +284,7 @@ CONTENT content_type = "application/unknown" cache_control = "no-cache" content_disposition = "attachment" - content_encoding = "gzip" + content_encoding = "identity" content_language = "en-GB" tags { Key1 = "Value 1" diff --git a/website/source/docs/providers/aws/r/s3_bucket_object.html.markdown b/website/source/docs/providers/aws/r/s3_bucket_object.html.markdown index 1432668ea..1d1a7f24f 100644 --- a/website/source/docs/providers/aws/r/s3_bucket_object.html.markdown +++ b/website/source/docs/providers/aws/r/s3_bucket_object.html.markdown @@ -62,6 +62,8 @@ resource "aws_s3_bucket_object" "examplebucket_object" { ## Argument Reference +-> **Note:** If you specify `content_encoding` you are responsible for encoding the body appropriately (i.e. `source` and `content` both expect already encoded/compressed bytes) + The following arguments are supported: * `bucket` - (Required) The name of the bucket to put the file in.