Skip to content

Commit

Permalink
BucketOwnerEnforced s3 buckets cant have an acl (#301)
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
  • Loading branch information
mfuhrmeisterDM and osterman authored Mar 18, 2024
1 parent cd9226e commit f3b5145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ resource "aws_s3_bucket_cors_configuration" "origin" {

resource "aws_s3_bucket_acl" "origin" {
depends_on = [aws_s3_bucket_ownership_controls.origin]
count = local.create_s3_origin_bucket ? 1 : 0
count = local.create_s3_origin_bucket && var.s3_object_ownership != "BucketOwnerEnforced" ? 1 : 0

bucket = one(aws_s3_bucket.origin).id
acl = "private"
Expand Down

0 comments on commit f3b5145

Please sign in to comment.