Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/aws_s3_bucket_inventory: Allow SSE-S3 encryption #5870

Merged
merged 1 commit into from
Sep 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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