Skip to content

Commit

Permalink
Merge pull request #7 from dshmelev/master
Browse files Browse the repository at this point in the history
Enable S3 access control lists (ACLs)
  • Loading branch information
sugdyzhekov authored Apr 21, 2023
2 parents 7da1f26 + 33f92fa commit 405ea5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions s3_bucket.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ resource "aws_s3_bucket" "logs" {
tags = local.tags
}

resource "aws_s3_bucket_ownership_controls" "logs" {
depends_on = [aws_s3_bucket_policy.logs]
bucket = aws_s3_bucket.logs.id
rule {
object_ownership = "ObjectWriter"
}
}

resource "aws_s3_bucket_policy" "logs" {
bucket = aws_s3_bucket.logs.id
policy = data.aws_iam_policy_document.bucket_policy.json
Expand Down

0 comments on commit 405ea5a

Please sign in to comment.