Skip to content

Commit 335d996

Browse files
author
nozaq
authored
Merge pull request nozaq#41 from centyx/master
Fixes nozaq#40
2 parents 169e789 + eab078f commit 335d996

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

modules/secure-bucket/main.tf

+17
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ resource "aws_s3_bucket" "access_log" {
1616
}
1717
}
1818

19+
resource "aws_s3_bucket_public_access_block" "access_log" {
20+
bucket = aws_s3_bucket.access_log.id
21+
22+
block_public_acls = true
23+
block_public_policy = true
24+
ignore_public_acls = true
25+
restrict_public_buckets = true
26+
}
27+
1928
resource "aws_s3_bucket" "content" {
2029
bucket = var.bucket_name
2130

@@ -50,3 +59,11 @@ resource "aws_s3_bucket" "content" {
5059
}
5160
}
5261

62+
resource "aws_s3_bucket_public_access_block" "content" {
63+
bucket = aws_s3_bucket.content.id
64+
65+
block_public_acls = true
66+
block_public_policy = true
67+
ignore_public_acls = true
68+
restrict_public_buckets = true
69+
}

0 commit comments

Comments
 (0)