Skip to content

Commit

Permalink
FIX: Do not create scaling policy if flag is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumit Sarkar committed Jul 4, 2019
1 parent fff7f83 commit 9897d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ resource "aws_appautoscaling_policy" "up" {
}

resource "aws_appautoscaling_policy" "down" {
count = var.disable_auto_scaling ? 1 : 0
count = var.disable_auto_scaling ? 0 : 1
name = "appScalingPolicy${title(var.environment)}${title(var.service_name)}ScaleDown"
service_namespace = "ecs"
resource_id = "service/${var.cluster_name}/${aws_ecs_service.main.name}"
Expand Down

0 comments on commit 9897d56

Please sign in to comment.