Skip to content

Commit f3b5145

Browse files
BucketOwnerEnforced s3 buckets cant have an acl (#301)
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
1 parent cd9226e commit f3b5145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ resource "aws_s3_bucket_cors_configuration" "origin" {
318318

319319
resource "aws_s3_bucket_acl" "origin" {
320320
depends_on = [aws_s3_bucket_ownership_controls.origin]
321-
count = local.create_s3_origin_bucket ? 1 : 0
321+
count = local.create_s3_origin_bucket && var.s3_object_ownership != "BucketOwnerEnforced" ? 1 : 0
322322

323323
bucket = one(aws_s3_bucket.origin).id
324324
acl = "private"

0 commit comments

Comments
 (0)