Skip to content

Commit

Permalink
[WIP] Fix count
Browse files Browse the repository at this point in the history
  • Loading branch information
samkahchiin committed Jul 10, 2024
1 parent 82e6079 commit c454587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/cloudwatch/alarm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "aws_cloudwatch_metric_alarm" "cluster_cpu" {

# This alarm is only available when the container insights are enabled in the ECS
resource "aws_cloudwatch_metric_alarm" "running_instance_count" {
count = var.enable_container_insights
count = var.enable_container_insights ? 1 : 0

alarm_name = "${var.project}-${var.environment}-ecs-service-${var.database_identifiers[count.index]}"
alarm_description = "Alert when zero running instance"
Expand Down

0 comments on commit c454587

Please sign in to comment.