From d11046688aa04be86b99aaee594feb6c67829b4b Mon Sep 17 00:00:00 2001 From: Marcio Goda Date: Tue, 2 Apr 2024 16:02:54 +0100 Subject: [PATCH] Revert "Revert "Fix the min and max count for the scalable target"" This reverts commit c95297b8275ab23409be9aa623f0091888b42089. --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 3ff630e..e67e28e 100644 --- a/main.tf +++ b/main.tf @@ -125,8 +125,8 @@ resource "aws_cloudwatch_log_subscription_filter" "kinesis_log_stderr_stream" { } resource "aws_appautoscaling_target" "ecs" { - min_capacity = var.desired_count - max_capacity = var.desired_count + min_capacity = floor(var.desired_count / 2) + max_capacity = var.desired_count * 3 resource_id = "service/${var.ecs_cluster}/${local.full_service_name}" scalable_dimension = "ecs:service:DesiredCount" service_namespace = "ecs"