Skip to content

Commit 1a6f1ff

Browse files
authored
Merge pull request #1 from pagopa/block-s3-public-access-block
Force all restrictions for public access to S3
2 parents 3748d9e + 1bd3750 commit 1a6f1ff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/init/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ resource "aws_s3_bucket_acl" "terraform_states" {
4040
acl = "private"
4141
}
4242

43+
resource "aws_s3_bucket_public_access_block" "terraform_states" {
44+
bucket = aws_s3_bucket.terraform_states.id
45+
block_public_acls = true
46+
block_public_policy = true
47+
ignore_public_acls = true
48+
restrict_public_buckets = true
49+
}
50+
4351
resource "aws_s3_bucket_versioning" "terraform_states" {
4452
bucket = aws_s3_bucket.terraform_states.id
4553
versioning_configuration {

0 commit comments

Comments
 (0)