resource "aws_autoscaling_policy" "bat" {
name = "foobar3-terraform-test"
scaling_adjustment = 4
adjustment_type = "ChangeInCapacity"
cooldown = 300
autoscaling_group_name = aws_autoscaling_group.bar.name
}
target_tracking_configuration {
predefined_metric_specification {
predefined_metric_type = "ASGAverageCPUUtilization"
}
target_value = 40.0
}
- asg-target-tracking-policy 전체 코드
resource "aws_autoscaling_policy" "target-tracking-policy" {
name = "target-tracking-policy"
policy_type = "TargetTrackingScaling"
estimated_instance_warmup = 60
autoscaling_group_name = aws_autoscaling_group.tf-asg.name
target_tracking_configuration {
predefined_metric_specification {
predefined_metric_type = "ASGAverageCPUUtilization"
}
target_value = 40.0
}
}
728x90
'Cloud > Terraform' 카테고리의 다른 글
Terraform - 07/14 (0) | 2022.07.14 |
---|---|
Terraform - RDS 생성 (0) | 2022.07.14 |
Terraform - Auto Scaling Attachment 생성 (0) | 2022.07.10 |
Terraform - Launch Configuration과 Auto Scaling Group 구성 및 작동 확인 (0) | 2022.07.10 |
Terraform - Launch Configuration과 Auto Scaling Group 구성 및 작동 확인 (0) | 2022.07.10 |