diff --git a/terraform/environments/ppud/sns.tf b/terraform/environments/ppud/sns.tf index 40d0266575e..8f9f80be94f 100644 --- a/terraform/environments/ppud/sns.tf +++ b/terraform/environments/ppud/sns.tf @@ -1,4 +1,4 @@ -#### Cloud Watch #### +#### Cloud Watch PROD #### resource "aws_sns_topic" "cw_alerts" { count = local.is-production == true ? 1 : 0 name = "ppud-prod-cw-alerts" @@ -16,3 +16,23 @@ resource "aws_sns_topic_subscription" "cw_subscription" { endpoint = "PPUDAlerts@colt.net" # endpoint = aws_secretsmanager_secret_version.support_email_account[0].secret_string } + +##### Cloud Watch UAT ###### + +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_uat_policy" { + count = local.is-preproduction == true ? 1 : 0 + 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_uat_subscription" { + count = local.is-preproduction == true ? 1 : 0 + topic_arn = aws_sns_topic.cw_uat_alerts[0].arn + protocol = "email" + endpoint = "PPUDAlerts@colt.net" +} \ No newline at end of file