-
-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce the usage of modern TLS versions (1.2 or higher) for S3 connections #237
Conversation
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
@amontalban that's a nice feature. dynamic "statement" {
for_each = var.minimum_tls_version != null? [var.minimum_tls_version] : []
content {
sid = "EnforceTLSVersion"
effect = "Deny"
actions = ["s3:*"]
resources = [local.bucket_arn, "${local.bucket_arn}/*"]
principals {
identifiers = ["*"]
type = "*"
}
condition {
test = "NumericLessThan"
values = [each.value]
variable = "s3:TlsVersion"
}
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
@goruha thanks for reviewing the PR, what do you think about it now?
|
/terratest |
@amontalban have you tested that the code works? I am a bit confused that terraform hcl https://developer.hashicorp.com/terraform/language/meta-arguments/for_each#basic-syntax use Can you add |
@goruha yeah, sorry I rushed based on your recommendation because I was on a hurry and didn't properly test the change. I have implemented the Let me know what do you think now. Thanks and sorry for the hassle!
|
/terratest |
/terratest |
These changes were released in v4.3.0. |
what
This variables adds a policy to the bucket to deny connections that do not use TLS 1.2 or higher.
why
This is required by our security team.
references
https://repost.aws/knowledge-center/s3-enforce-modern-tls