Skip to content

Commit 48f0857

Browse files
authored
Fix empty alarm actions (#38)
1 parent eea2372 commit 48f0857

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ resource "aws_cloudwatch_metric_alarm" "cpu_high" {
1414
ClusterName = var.ecs_cluster_name
1515
ServiceName = var.ecs_service_name
1616
}
17-
alarm_actions = [
17+
alarm_actions = compact([
1818
aws_appautoscaling_policy.scale_up_policy.arn,
1919
var.sns_topic_arn != "" ? var.sns_topic_arn : ""
20-
]
20+
])
2121
tags = var.tags
2222
}
2323

@@ -37,10 +37,10 @@ resource "aws_cloudwatch_metric_alarm" "cpu_low" {
3737
ClusterName = var.ecs_cluster_name
3838
ServiceName = var.ecs_service_name
3939
}
40-
alarm_actions = [
40+
alarm_actions = compact([
4141
aws_appautoscaling_policy.scale_down_policy.arn,
4242
var.sns_topic_arn != "" ? var.sns_topic_arn : ""
43-
]
43+
])
4444
tags = var.tags
4545
}
4646

0 commit comments

Comments
 (0)