terraform-aws-modules / terraform-aws-s3-bucket

Terraform module to create AWS S3 resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws
Apache License 2.0
526 stars 3.62k forks source link

example for BucketOwnerEnforced (disabled ACLs) #250

Closed marekaf closed 1 year ago

marekaf commented 1 year ago

Is your request related to a problem? Please describe.

Hi. I think it is not clear on how to create an S3 bucket with ACLs disabled (BucketOwnerEnforced, acl not set).

Creating a bucket with object_ownership = "BucketOwnerEnforced" and acl = "private" will fail. It is not clear enough from the README as why this is wrong.

Describe the solution you'd like.

Is it possible to provide a working example in examples/complete perhaps? Also to mention what and if acl variable should be set to.

Thanks!

antonbabenko commented 1 year ago

object_ownership = "BucketOwnerEnforced" and acl = "private" will fail because this is an invalid combination of parameters according to the behavior of Amazon S3 (read the docs).

Please take a look into examples/complete - there are various combinations of the values shown.

marekaf commented 1 year ago

In examples/complete there's not even a single example of BucketOwnerEnforced. That's what I'm requesting in this Issue.

I mentioned that I know that this combination is invalid (because I "read the docs") but the docs of this module don't make that obvious for somebody who doesn't know s3 as much.

github-actions[bot] commented 1 year ago

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.