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

Amazon S3 encrypts new objects by default #28701

Closed
ewbankkit opened this issue Jan 5, 2023 · 3 comments
Closed

Amazon S3 encrypts new objects by default #28701

ewbankkit opened this issue Jan 5, 2023 · 3 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service.

Comments

@ewbankkit
Copy link
Contributor

ewbankkit commented Jan 5, 2023

Starting today, Amazon Simple Storage Service (Amazon S3) encrypts all new objects by default. Now, S3 automatically applies server-side encryption (SSE-S3) for each new object, unless you specify a different encryption option.

Announcement.
Blog post.

Relates #28353.

Once this new default server-side encryption capability is enabled in an account, this simple configuration

resource "aws_s3_bucket" "bucket" {
  bucket = "tf-test-bucket-5888573260763529678"
}

will show drift when terraform plan is run using Terraform AWS Provider v3.x and v2.x:

% make testacc TESTARGS='-run=TestAccS3Bucket_Basic_basic' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3Bucket_Basic_basic -timeout 180m
=== RUN   TestAccS3Bucket_Basic_basic
=== PAUSE TestAccS3Bucket_Basic_basic
=== CONT  TestAccS3Bucket_Basic_basic
    bucket_test.go:52: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # aws_s3_bucket.bucket will be updated in-place
          ~ resource "aws_s3_bucket" "bucket" {
                id                          = "tf-test-bucket-5888573260763529678"
                # (11 unchanged attributes hidden)
        
              - server_side_encryption_configuration {
                  - rule {
                      - bucket_key_enabled = false -> null
        
                      - apply_server_side_encryption_by_default {
                          - sse_algorithm = "AES256" -> null
                        }
                    }
                }
        
                # (1 unchanged block hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccS3Bucket_Basic_basic (17.94s)

Practitioners using Terraform AWS Provider v4.x are not affected as the server_side_encryption_configuration argument is already Computed (as it has been deprecated).

@github-actions
Copy link

github-actions bot commented Jan 5, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@ewbankkit ewbankkit added service/s3 Issues and PRs that pertain to the s3 service. enhancement Requests to existing resources that expand the functionality or scope. labels Jan 5, 2023
@ewbankkit
Copy link
Contributor Author

Available in Terraform AWS Provider

@github-actions
Copy link

github-actions bot commented Feb 5, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

No branches or pull requests

1 participant