diff --git a/terraform/environments/ppud/sns.tf b/terraform/environments/ppud/sns.tf index e08a1f5fc95..8f9f80be94f 100644 --- a/terraform/environments/ppud/sns.tf +++ b/terraform/environments/ppud/sns.tf @@ -19,20 +19,20 @@ resource "aws_sns_topic_subscription" "cw_subscription" { ##### Cloud Watch UAT ###### -resource "aws_sns_topic" "cw_alerts" { +resource "aws_sns_topic" "cw_uat_alerts" { count = local.is-preproduction == true ? 1 : 0 name = "ppud-uat-cw-alerts" } -resource "aws_sns_topic_policy" "sns_policy" { +resource "aws_sns_topic_policy" "sns_uat_policy" { count = local.is-preproduction == true ? 1 : 0 - arn = aws_sns_topic.cw_alerts[0].arn + arn = aws_sns_topic.cw_uat_alerts[0].arn policy = data.aws_iam_policy_document.sns_topic_policy_ec2cw[0].json } -resource "aws_sns_topic_subscription" "cw_subscription" { +resource "aws_sns_topic_subscription" "cw_uat_subscription" { count = local.is-preproduction == true ? 1 : 0 - topic_arn = aws_sns_topic.cw_alerts[0].arn + topic_arn = aws_sns_topic.cw_uat_alerts[0].arn protocol = "email" endpoint = "PPUDAlerts@colt.net" } \ No newline at end of file