Skip to content

Commit

Permalink
clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkotof committed Jan 17, 2022
1 parent 77a76c3 commit dfcc4ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ecs-modules/ecs-service/autoscaling.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ resource "aws_appautoscaling_policy" "ecs_policy_cpu" {

resource "aws_appautoscaling_scheduled_action" "up" {
count = length(var.autoscale_scheduled_up)
name = "${var.name}-${count.index}-scheduled-up-autoscaling"
name = "${var.name}-scheduled-up-autoscaling-${count.index}"
resource_id = aws_appautoscaling_target.this[0].resource_id
scalable_dimension = aws_appautoscaling_target.this[0].scalable_dimension
service_namespace = aws_appautoscaling_target.this[0].service_namespace
Expand All @@ -55,12 +55,11 @@ resource "aws_appautoscaling_scheduled_action" "up" {
max_capacity = var.autoscaling_max_size
}

#depends_on = [aws_appautoscaling_target.this]
}

resource "aws_appautoscaling_scheduled_action" "down" {
count = length(var.autoscale_scheduled_down)
name = "${var.name}-${count.index}-scheduled-down-autoscaling"
name = "${var.name}-scheduled-down-autoscaling-${count.index}"
resource_id = aws_appautoscaling_target.this[0].resource_id
scalable_dimension = aws_appautoscaling_target.this[0].scalable_dimension
service_namespace = aws_appautoscaling_target.this[0].service_namespace
Expand All @@ -70,5 +69,4 @@ resource "aws_appautoscaling_scheduled_action" "down" {
min_capacity = var.min_size
max_capacity = var.max_size
}
#depends_on = [aws_appautoscaling_scheduled_action.up[6]]
}

0 comments on commit dfcc4ca

Please sign in to comment.