-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Allow passing existing sns topic var #46
Allow passing existing sns topic var #46
Conversation
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.
Bridgecrew has found errors in this PR ⬇️
create_sns_topic = var.aws_sns_topic_arn == "" | ||
aws_sns_topic_arn = local.create_sns_topic ? aws_sns_topic.default.*.arn : [var.aws_sns_topic_arn] | ||
} | ||
|
||
resource "aws_sns_topic" "default" { |
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.
Ensure AWS SNS topic has SSE enabled
Resource: aws_sns_topic.default | ID: BC_AWS_GENERAL_15
How to Fix
resource "aws_sns_topic" "example" {
...
name = "user-updates-topic"
+ kms_master_key_id = "alias/aws/sns"
}
Description
Amazon SNS is a publishers and subscribers messaging service. When you publish messages to encrypted topics, customer master keys (CMK), powered by AWS KMS, can be used to encrypt your messages.If you operate in a regulated market, such as HIPAA for healthcare, PCI DSS for finance, or FedRAMP for government, you need to ensure sensitive data messages passed in this service are encrypted at rest.
Benchmarks
- PCI-DSS V3.2 3
- FEDRAMP (MODERATE) SC-28
/test all |
create_sns_topic = var.aws_sns_topic_arn == "" | ||
aws_sns_topic_arn = local.create_sns_topic ? aws_sns_topic.default.*.arn : [var.aws_sns_topic_arn] | ||
} | ||
|
||
resource "aws_sns_topic" "default" { |
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.
Ensure AWS SNS topic has SSE enabled
Resource: module.rds_alarms.aws_sns_topic.default | ID: BC_AWS_GENERAL_15
How to Fix
resource "aws_sns_topic" "example" {
...
name = "user-updates-topic"
+ kms_master_key_id = "alias/aws/sns"
}
Description
Amazon SNS is a publishers and subscribers messaging service. When you publish messages to encrypted topics, customer master keys (CMK), powered by AWS KMS, can be used to encrypt your messages.If you operate in a regulated market, such as HIPAA for healthcare, PCI DSS for finance, or FedRAMP for government, you need to ensure sensitive data messages passed in this service are encrypted at rest.
Benchmarks
- PCI-DSS V3.2 3
- FEDRAMP (MODERATE) SC-28
🎉 Fixed by commit 9580fac - Add test for existing SNS topic
/test all |
/test bats |
/test terratest |
/test terratest |
/test terratest |
what
why
references