Last active
September 22, 2020 05:50
-
-
Save sschrijver/d6b1e1c2e3b98417c0e8b80acbcf6668 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_appautoscaling_policy" "scale_up_fargate" { | |
policy_type = "StepScaling" | |
name = "sqs-scaling-up-${var.service_name}" | |
resource_id = aws_appautoscaling_target.ecs_target.resource_id | |
scalable_dimension = aws_appautoscaling_target.ecs_target.scalable_dimension | |
service_namespace = aws_appautoscaling_target.ecs_target.service_namespace | |
step_scaling_policy_configuration { | |
adjustment_type = "ExactCapacity" | |
metric_aggregation_type = "Average" | |
step_adjustment { | |
metric_interval_lower_bound = 0 | |
metric_interval_upper_bound = 500 | |
scaling_adjustment = 1 | |
} | |
step_adjustment { | |
metric_interval_lower_bound = 500 | |
metric_interval_upper_bound = 1000 | |
scaling_adjustment = 2 | |
} | |
step_adjustment { | |
metric_interval_lower_bound = 1000 | |
scaling_adjustment = 3 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment