-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add Object Ownership ACLs disabled for S3 buckets #22069
Comments
This is effectively implemented via the According to the upstream documentation, using the "enforced" setting has the effect of disabling ACLs: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html |
Relates #22271. |
@lachlancooper This Issue is slightly different to the one in #22010. #22010 relates to the PutBucketOwnershipControls API (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketOwnershipControls.html). A different approach is that BucketOwnerEnforced can also be set on the CreateBucket API using x-amz-object-ownership header (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html). Where this becomes an issue is if you try implement the AWS Service Control Policy { https://docs.aws.amazon.com/AmazonS3/latest/userguide/ensure-object-ownership.html Since the Deny is done on the CreateBucket API then the PutBucketOwnershipControls will fail since the API is after CreateBucket API. At it stands, it is not possible to implement this AWS Service Control Policy if using Terraform. |
Already there: resource "aws_s3_bucket_ownership_controls" "disable_s3_acl" {
bucket = "your-bucket"
rule {
object_ownership = "BucketOwnerEnforced"
}
} |
This issue was raised against the However, as noted by @StevieBowman, being able to create a bucket with a specific object ownership setting from the beginning is necessary if a user wants to disable ACLs on all buckets as AWS recommend. This would need to be implemented as an argument on the |
I put my comment on another issue: #22271 (comment) |
Since this was resolved (see #22069 (comment) above), I'll mark this issue as closed and continue the additional discussions as needed over on #22271. If you feel I've done this in error, please do let me know. |
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. |
Community Note
Description
Add ability to disable S3 bucket ACLs for a given bucket, as announced here.
(Since the
rule
block inaws_s3_bucket_ownership_controls
is currently required, to ensure it stays backwards compatible, we can add the new setting to therule
block.New or Affected Resource(s)
aws_s3_bucket_ownership_controls
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: