Skip to content

Commit

Permalink
BucketOwnerEnforced s3 buckets cant have an acl
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Fuhrmeister committed Mar 12, 2024
1 parent 7b93511 commit a0b819e
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 a0b819e

Please sign in to comment.