Skip to content

Commit

Permalink
add https only S3 bucket policy
Browse files Browse the repository at this point in the history
  • Loading branch information
jrlonan-gt committed Oct 25, 2023
1 parent 24cee14 commit 647b420
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions modules/fluentd/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ data "aws_iam_policy_document" "logs_s3" {
]
}

statement {
sid = "AllowSSLRequestsOnly"
actions = ["s3:*"]
effect = "Deny"

resources = [
aws_s3_bucket.logs[0].arn,
"${aws_s3_bucket.logs[0].arn}/*",
]

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

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

statement {
effect = "Allow"

Expand Down

0 comments on commit 647b420

Please sign in to comment.