Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
atthematyo committed Jun 17, 2024
1 parent 6ede92b commit 167f0f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ resource "aws_s3_bucket" "main" {

}

resource "aws_s3_bucket_ownership_controls" "main" {
bucket = aws_s3_bucket.main.id
rule {
object_ownership = "BucketOwnerPreferred"
}
}

resource "aws_s3_bucket_acl" "main_acl" {
depends_on = [aws_s3_bucket_ownership_controls.main]

bucket = aws_s3_bucket.main.id
acl = "private"
}
Expand Down

0 comments on commit 167f0f0

Please sign in to comment.