Skip to content
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 of a new variable aws_sns_topic_arn and not create an SNS topic #36

Conversation

bogdanbarna
Copy link

what

  • Add variable aws_sns_topic_arn
  • This extends the current module, allowing users to pass the ARN of an existing SNS topic
  • The locals block in main.tf handles the logic of whether to create aws_sns_topic.default.

why

  • Some teams use one SNS topic for multiple CloudWatch alarms

references

Closes #34.

@bogdanbarna bogdanbarna requested review from a team as code owners July 13, 2021 07:57
@bogdanbarna bogdanbarna requested review from srhopkins and nitrocode and removed request for a team July 13, 2021 07:57
Copy link

@bridgecrew bridgecrew bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bridgecrew has found 1 infrastructure configuration error 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" {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MEDIUM   Ensure all data stored in the SNS topic is encrypted
    Resource: aws_sns_topic.default | ID: BC_AWS_GENERAL_15

How to Fix

resource "aws_sns_topic" "user_updates" {
  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
Dependent Resources

Calculating...

Copy link
Member

@nitrocode nitrocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The auto format is failing.

@GregoryVds
Copy link

GregoryVds commented Feb 24, 2022

Hi
I am interested in getting this merged as well.

@nitrocode it seems that the autoformat error was a transient one?
Error: We are currently unable to download the log. Please try again later.

Can we trigger another build and hopefully get this merged in?

@bogdanbarna
Copy link
Author

Hi. Sorry, totally forgot about this one. I'll take a look at the formatting issue later today and hopefully push a commit for it. Thanks.

@bogdanbarna
Copy link
Author

Hi. I apologize for the late reply. I'm not able to have this running again and also don't work with ClassEDU (where the fork was created) anymore.
Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to not generate a new SNS topic
3 participants