diff --git a/main.tf b/main.tf index 36d9d05..9af341e 100644 --- a/main.tf +++ b/main.tf @@ -253,7 +253,7 @@ resource "aws_appautoscaling_target" "ecs" { max_capacity = lookup(var.appautoscaling_settings, "max_capacity", var.desired_count) min_capacity = lookup(var.appautoscaling_settings, "min_capacity", var.desired_count) - resource_id = "service/${var.cluster_id}/${aws_ecs_service.this.name}" + resource_id = "service/${var.cluster_name}/${aws_ecs_service.this.name}" scalable_dimension = "ecs:service:DesiredCount" service_namespace = "ecs" } diff --git a/variables.tf b/variables.tf index e0e8a03..6e2548c 100644 --- a/variables.tf +++ b/variables.tf @@ -8,6 +8,10 @@ variable "cluster_id" { type = string } +variable "cluster_name" { + description = "The ECS cluster name" +} + variable "container_port" { description = "The port used by the app within the container." type = number