Skip to content

Commit

Permalink
fix ACL setup for public bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
djelusic committed Feb 14, 2022
1 parent 0cb08f0 commit e6a53c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node/terraform/modules/public-site/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
resource "aws_s3_bucket" "public" {
bucket = var.bucket_name
acl = "public-read"
force_destroy = true

website {
Expand All @@ -9,6 +8,11 @@ resource "aws_s3_bucket" "public" {
}
}

resource "aws_s3_bucket_acl" "public_read" {
bucket = aws_s3_bucket.public.id
acl = "public-read"
}

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

0 comments on commit e6a53c0

Please sign in to comment.