Skip to content

Commit 07d96f9

Browse files
authored
1 parent f5fd21d commit 07d96f9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

chapter6/part1_s3backend/main.tf

+10-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ resource "aws_s3_bucket" "s3_bucket" {
6464
}
6565
}
6666

67+
resource "aws_s3_bucket_public_access_block" "s3_bucket" {
68+
bucket = aws_s3_bucket.s3_bucket.id
69+
70+
block_public_acls = true
71+
block_public_policy = true
72+
ignore_public_acls = true
73+
restrict_public_buckets = true
74+
}
75+
6776
resource "aws_dynamodb_table" "dynamodb_table" {
6877
name = "${local.namespace}-state-lock"
6978
hash_key = "LockID"
@@ -75,4 +84,4 @@ resource "aws_dynamodb_table" "dynamodb_table" {
7584
tags = {
7685
ResourceGroup = local.namespace
7786
}
78-
}
87+
}

0 commit comments

Comments
 (0)