Skip to content

Commit 49b118a

Browse files
committed
fix: fix
1 parent d9c46ef commit 49b118a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

main.tf

+17
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ resource "aws_s3_bucket_acl" "website" {
88
bucket = aws_s3_bucket.website.id
99
acl = "public-read"
1010
}
11+
resource "aws_s3_bucket_public_access_block" "website" {
12+
bucket = aws_s3_bucket.website.id
13+
14+
block_public_acls = false
15+
block_public_policy = false
16+
ignore_public_acls = false
17+
restrict_public_buckets = false
18+
}
1119
resource "aws_s3_bucket_website_configuration" "website" {
1220
bucket = aws_s3_bucket.website.bucket
1321

@@ -37,6 +45,15 @@ resource "aws_s3_bucket" "website_redirect_apex" {
3745
Website = var.name
3846
}
3947
}
48+
resource "aws_s3_bucket_public_access_block" "website_redirect_apex" {
49+
count = var.apex_redirect ? 1 : 0
50+
bucket = aws_s3_bucket.website_redirect_apex[0].id
51+
52+
block_public_acls = false
53+
block_public_policy = false
54+
ignore_public_acls = false
55+
restrict_public_buckets = false
56+
}
4057
resource "aws_s3_bucket_acl" "website_redirect_apex" {
4158
count = var.apex_redirect ? 1 : 0
4259
bucket = aws_s3_bucket.website_redirect_apex[0].id

0 commit comments

Comments
 (0)