Skip to content

Commit 12e95e2

Browse files
authored
Merge pull request #6 from geekcell/fix/error-when-var-sns-topic-wasnt-set
fix(NO-TICKET): Error when the SNS Topic ARN wasn't set
2 parents 7f466cd + 917a954 commit 12e95e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ resource "aws_cloudwatch_metric_alarm" "main" {
4949
statistic = each.value.statistic
5050
alarm_description = each.value.description
5151

52-
alarm_actions = [coalesce(var.sns_topic_arn, aws_sns_topic.main[0].arn)]
52+
alarm_actions = [coalesce(var.sns_topic_arn, try(aws_sns_topic.main[0].arn, null))]
5353
treat_missing_data = "notBreaching"
5454

5555
tags = var.tags

0 commit comments

Comments
 (0)