Skip to content

Commit

Permalink
Fix empty alarm actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aclemmensen authored Sep 19, 2024
1 parent eea2372 commit 2bd233b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ resource "aws_cloudwatch_metric_alarm" "cpu_high" {
ClusterName = var.ecs_cluster_name
ServiceName = var.ecs_service_name
}
alarm_actions = [
alarm_actions = compact([
aws_appautoscaling_policy.scale_up_policy.arn,
var.sns_topic_arn != "" ? var.sns_topic_arn : ""
]
])
tags = var.tags
}

Expand All @@ -37,10 +37,10 @@ resource "aws_cloudwatch_metric_alarm" "cpu_low" {
ClusterName = var.ecs_cluster_name
ServiceName = var.ecs_service_name
}
alarm_actions = [
alarm_actions = compact([
aws_appautoscaling_policy.scale_down_policy.arn,
var.sns_topic_arn != "" ? var.sns_topic_arn : ""
]
])
tags = var.tags
}

Expand Down

0 comments on commit 2bd233b

Please sign in to comment.