Skip to content

Commit

Permalink
Merge pull request #3 from quortex/FTR_S3.8
Browse files Browse the repository at this point in the history
removing public acls on bucket following S3.8 security recommendation
  • Loading branch information
swbsf authored Sep 13, 2022
2 parents 408f59a + 270a1ea commit 0f58d8c
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 @@ -130,6 +130,15 @@ resource "aws_s3_bucket" "access_logs" {
tags = var.tags
}
resource "aws_s3_bucket_public_access_block" "access_logs" {
bucket = aws_s3_bucket.access_logs.id

block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}

resource "aws_s3_bucket_policy" "access_logs" {
bucket = aws_s3_bucket.access_logs.id
policy = jsonencode({
Expand Down

0 comments on commit 0f58d8c

Please sign in to comment.