Skip to content

Commit 563e365

Browse files
authored
Merge pull request #79 from companieshouse/feature/DVOP-3043_s3_ssl_policy
add new s3 ssl policy
2 parents cd5818a + cc19b80 commit 563e365

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

groups/storage/data.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,29 @@ data "aws_iam_policy_document" "bucket" {
5656
values = ["aws:kms"]
5757
}
5858
}
59+
60+
statement {
61+
sid = "allow_ssl_requests_only"
62+
effect = "Deny"
63+
64+
principals {
65+
type = "*"
66+
identifiers = ["*"]
67+
}
68+
69+
actions = [
70+
"s3:*"
71+
]
72+
73+
resources = [
74+
"${aws_s3_bucket.data.arn}",
75+
"${aws_s3_bucket.data.arn}/*"
76+
]
77+
78+
condition {
79+
test = "Bool"
80+
variable = "aws:SecureTransport"
81+
values = ["false"]
82+
}
83+
}
5984
}

0 commit comments

Comments
 (0)