Skip to content

Commit

Permalink
add securetransport for compliance (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
dchocoboo and David authored Sep 2, 2022
1 parent 3b0815c commit ff3b078
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,32 @@ data "aws_iam_policy_document" "logs_access_policy_document" {
actions = ["s3:GetBucketAcl"]
resources = [aws_s3_bucket.logs.arn]
}

statement {
sid = "https-only"

principals {
type = "*"
identifiers = ["*"]
}

effect = "Deny"

actions = [
"s3:*",
]

resources = [
"arn:aws:s3:::${aws_s3_bucket.logs.id}",
"arn:aws:s3:::${aws_s3_bucket.logs.id}/*",
]

condition {
test = "Bool"
variable = "aws:SecureTransport"
values = [false]
}
}
}

#------------------------------------------------------------------------------
Expand Down

0 comments on commit ff3b078

Please sign in to comment.