File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -305,12 +305,17 @@ resource "aws_s3_bucket" "origin" {
305305}
306306
307307resource "aws_s3_bucket_public_access_block" "origin" {
308- count = (local. create_s3_origin_bucket || local. override_origin_bucket_policy ) ? 1 : 0
309- bucket = local. bucket
310- block_public_acls = true
308+ count = (local. create_s3_origin_bucket || local. override_origin_bucket_policy ) ? 1 : 0
309+
310+ bucket = local. bucket
311+
312+ # Allows the bucket to be publicly accessible by policy
311313 block_public_policy = var. block_origin_public_access_enabled
312- ignore_public_acls = true
313- restrict_public_buckets = true
314+ restrict_public_buckets = var. block_origin_public_access_enabled
315+
316+ # Always block ACL access. We're using policies instead
317+ block_public_acls = true
318+ ignore_public_acls = true
314319}
315320
316321resource "aws_s3_bucket_ownership_controls" "origin" {
You can’t perform that action at this time.
0 commit comments