Skip to content

Commit

Permalink
fix autoscaling resource_id
Browse files Browse the repository at this point in the history
  • Loading branch information
ziazek committed Dec 29, 2023
1 parent f289414 commit 906322a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 906322a

Please sign in to comment.