Difference between revisions of "Terraform resource: aws appautoscaling policy"
Jump to navigation
Jump to search
↑ https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_policy
Line 33: | Line 33: | ||
== Related == | == Related == | ||
* [[Terraform DynamoDB]] | * [[Terraform DynamoDB]] | ||
+ | * <code>[[aws_appautoscaling_target]]</code> | ||
== See also == | == See also == |
Revision as of 14:17, 2 March 2023
aws_appautoscaling_policy
[1]
ECS Example
resource "aws_appautoscaling_target" "ecs_target" { max_capacity = 4 min_capacity = 1 resource_id = "service/clusterName/serviceName" scalable_dimension = "ecs:service:DesiredCount" service_namespace = "ecs" }
resource "aws_appautoscaling_policy" "ecs_policy" { name = "scale-down" policy_type = "StepScaling" 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 = "ChangeInCapacity" cooldown = 60 metric_aggregation_type = "Maximum"
step_adjustment { metric_interval_upper_bound = 0 scaling_adjustment = -1 } } }
Related
See also
- Terraform AWS autoscaling:
aws_appautoscaling_policy, aws_appautoscaling_target, aws_autoscaling_group, asg_desired_capacity
- Terraform AWS resources: IAM, Net, EC2, ECS, ECR, S3, Route53, ACM, CloudWatch, CloudFront SES, RDS, DLM
Advertising: