【发布时间】:2020-04-17 13:26:11
【问题描述】:
我正在设置一个模块来在 terraform 中配置 ASG 中的自动缩放。理想情况下,我想将地图列表传递给我的模块并让它循环遍历它们,为列表中的每个地图添加一个 step_adjustment 到策略中,但这似乎不起作用。
当前设置:
name = "Example Auto-Scale Up Policy"
policy_type = "StepScaling"
autoscaling_group_name = "${aws_autoscaling_group.example_asg.name}"
adjustment_type = "PercentChangeInCapacity"
estimated_instance_warmup = 300
step_adjustment {
scaling_adjustment = 20
metric_interval_lower_bound = 0
metric_interval_upper_bound = 5
}
step_adjustment {
scaling_adjustment = 25
metric_interval_lower_bound = 5
metric_interval_upper_bound = 15
}
step_adjustment {
scaling_adjustment = 50
metric_interval_lower_bound = 15
}
min_adjustment_magnitude = 4
}
我只想将三个step_adjustments 作为变量提供到我的模块中。
【问题讨论】:
标签: amazon-ec2 terraform terraform-provider-aws