Skip to content

Commit

Permalink
Merge pull request #5870 from terraform-providers/f-aws_s3_bucket_inv…
Browse files Browse the repository at this point in the history
…entory-sse-s3

resource/aws_s3_bucket_inventory: Allow SSE-S3 encryption
  • Loading branch information
bflad authored Sep 14, 2018
2 parents c729400 + 6a9a411 commit 6190f3c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
9 changes: 0 additions & 9 deletions aws/resource_aws_s3_bucket_inventory.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package aws

import (
"errors"
"fmt"
"log"
"strings"
Expand Down Expand Up @@ -329,14 +328,6 @@ func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{})
}

if output.InventoryConfiguration.Destination != nil {
// Flag the existence of SSE-S3 encryption because it cannot be marshaled when updating a resource.
// Allowing import would risk disabling encryption inadvertently when applying updates.
if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption != nil {
if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption.SSES3 != nil {
return errors.New("sse_s3 encryption is unsupported")
}
}

destination := map[string]interface{}{
"bucket": flattenS3InventoryS3BucketDestination(output.InventoryConfiguration.Destination.S3BucketDestination),
}
Expand Down
2 changes: 0 additions & 2 deletions aws/resource_aws_s3_bucket_inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ func TestAccAWSS3BucketInventory_basic(t *testing.T) {
}

func TestAccAWSS3BucketInventory_encryptWithSSES3(t *testing.T) {
t.Skip("SSE-S3 is not supported by the SDK.")

var conf s3.InventoryConfiguration
rString := acctest.RandString(8)
resourceName := "aws_s3_bucket_inventory.test"
Expand Down
2 changes: 0 additions & 2 deletions website/docs/r/s3_bucket_inventory.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ The `bucket` configuration supports the following:

The `encryption` configuration supports the following:

~> **NOTE:** `sse_s3` is currently unsupported.

* `sse_kms` - (Optional) Specifies to use server-side encryption with AWS KMS-managed keys to encrypt the inventory file (documented below).
* `sse_s3` - (Optional) Specifies to use server-side encryption with Amazon S3-managed keys (SSE-S3) to encrypt the inventory file.

Expand Down

0 comments on commit 6190f3c

Please sign in to comment.