Skip to content

Commit 596f57a

Browse files
authored
Update the check before coalesce more robust (#42)
1 parent 2f70214 commit 596f57a

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
@@ -16,7 +16,7 @@ resource "aws_cloudwatch_metric_alarm" "cpu_high" {
1616
}
1717
alarm_actions = compact([
1818
aws_appautoscaling_policy.scale_up_policy.arn,
19-
var.sns_topic_arn != "" || var.high_cpu_sns_topic_arn != "" ? coalesce(var.sns_topic_arn, var.high_cpu_sns_topic_arn, "") : ""
19+
(var.sns_topic_arn != "" && var.sns_topic_arn != null) || (var.high_cpu_sns_topic_arn != "" && var.high_cpu_sns_topic_arn != null) ? coalesce(var.sns_topic_arn, var.high_cpu_sns_topic_arn, "") : ""
2020
])
2121
tags = var.tags
2222
}

0 commit comments

Comments
 (0)