Skip to content

Commit

Permalink
Merge pull request #1 from pagopa/block-s3-public-access-block
Browse files Browse the repository at this point in the history
Force all restrictions for public access to S3
  • Loading branch information
uolter authored Jun 23, 2022
2 parents 3748d9e + 1bd3750 commit 1a6f1ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/init/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ resource "aws_s3_bucket_acl" "terraform_states" {
acl = "private"
}

resource "aws_s3_bucket_public_access_block" "terraform_states" {
bucket = aws_s3_bucket.terraform_states.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}

resource "aws_s3_bucket_versioning" "terraform_states" {
bucket = aws_s3_bucket.terraform_states.id
versioning_configuration {
Expand Down

0 comments on commit 1a6f1ff

Please sign in to comment.