Skip to content

Commit 8ea1d89

Browse files
authored
Merge pull request #3 from companieshouse/implementation
Initial implementation improvements
2 parents 1825b80 + aeefe15 commit 8ea1d89

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Mac files
2+
.DS_Store
3+
._*
4+
5+
# Terraform local state
6+
.terraform
7+
8+
# Local Terraform workspace data
9+
terraform.tfstate.backup
10+
terraform.tfstate.d

groups/storage/s3.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,20 @@ resource "aws_s3_bucket_policy" "data" {
3030
bucket = aws_s3_bucket.data.id
3131
policy = data.aws_iam_policy_document.bucket.json
3232
}
33+
34+
resource "aws_s3_bucket_public_access_block" "data" {
35+
bucket = aws_s3_bucket.data.id
36+
37+
block_public_acls = true
38+
block_public_policy = true
39+
ignore_public_acls = true
40+
restrict_public_buckets = true
41+
}
42+
43+
resource "aws_s3_bucket_ownership_controls" "data" {
44+
bucket = aws_s3_bucket.data.id
45+
46+
rule {
47+
object_ownership = "BucketOwnerEnforced"
48+
}
49+
}

0 commit comments

Comments
 (0)