Skip to content
Permalink
Browse files

Fixing autoscaling for ECS services: The previous policy did scale up…

… correctly but caused an exception with an empty error message, when scale downs were attempted. (#78)
  • Loading branch information
faester authored and maartenvanderhoef committed Sep 23, 2019
1 parent b520b6d commit 3cef8d38f4d75fd60a5cb6093247f16500872767
Showing with 2 additions and 1 deletion.
  1. +2 −1 modules/ecs_autoscaling/main.tf
@@ -25,7 +25,8 @@ resource "aws_appautoscaling_policy" "policy" {
metric_aggregation_type = "Average"

step_adjustment {
metric_interval_lower_bound = 0
metric_interval_lower_bound = "${lookup(var.scaling_properties[count.index], "scaling_adjustment") == "-1" ? "" : "0"}"
metric_interval_upper_bound = "${lookup(var.scaling_properties[count.index], "scaling_adjustment") == "-1" ? "0" : ""}"
scaling_adjustment = "${lookup(var.scaling_properties[count.index], "scaling_adjustment")}"
}
}

0 comments on commit 3cef8d3

Please sign in to comment.
You can’t perform that action at this time.