Skip to content

Commit 9897d56

Browse files
author
Sumit Sarkar
committed
FIX: Do not create scaling policy if flag is disabled
1 parent fff7f83 commit 9897d56

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
@@ -124,7 +124,7 @@ resource "aws_appautoscaling_policy" "up" {
124124
}
125125

126126
resource "aws_appautoscaling_policy" "down" {
127-
count = var.disable_auto_scaling ? 1 : 0
127+
count = var.disable_auto_scaling ? 0 : 1
128128
name = "appScalingPolicy${title(var.environment)}${title(var.service_name)}ScaleDown"
129129
service_namespace = "ecs"
130130
resource_id = "service/${var.cluster_name}/${aws_ecs_service.main.name}"

0 commit comments

Comments
 (0)