[INFO] Running Terraform apply...
module.default_target_tracking[0].aws_autoscaling_policy.target_scaling_policy_ppasg["asg-v005"]: Creating...
module.default_target_tracking[0].aws_autoscaling_policy.target_scaling_policy_ppasg["asg-v003"]: Creating...
module.default_target_tracking[0].aws_autoscaling_policy.target_scaling_policy_ppasg["asg-v004"]: Creating...
Error: creating Auto Scaling Policy (asg-v003): ValidationError: Only one TargetTrackingScaling policy for a given metric specification is allowed.
status code: 400, request id: 142f9c8c-8713-47c4-87a4-2e40cb020ac0
with module.default_target_tracking[0].aws_autoscaling_policy.target_scaling_policy_ppasg["asg-v003"],
on modules/target-scaling/scaling.tf line 1, in resource "aws_autoscaling_policy" "target_scaling_policy_ppasg":
1: resource "aws_autoscaling_policy" "target_scaling_policy_ppasg" {
Error: creating Auto Scaling Policy (asg-v005): ValidationError: Only one TargetTrackingScaling policy for a given metric specification is allowed.
status code: 400, request id: 7a5a3d65-bb21-4e06-8d96-75fe8d3e0548
with module.default_target_tracking[0].aws_autoscaling_policy.target_scaling_policy_ppasg["asg-v005"],
on modules/target-scaling/scaling.tf line 1, in resource "aws_autoscaling_policy" "target_scaling_policy_ppasg":
1: resource "aws_autoscaling_policy" "target_scaling_policy_ppasg" {
Error: creating Auto Scaling Policy (asg-v004): ValidationError: Only one TargetTrackingScaling policy for a given metric specification is allowed.
status code: 400, request id: 6b2c7e99-e585-4cdf-9bd2-677240ae5dc1
with module.default_target_tracking[0].aws_autoscaling_policy.target_scaling_policy_ppasg["-asg-v004"],
on modules/target-scaling/scaling.tf line 1, in resource "aws_autoscaling_policy" "target_scaling_policy_ppasg":
1: resource "aws_autoscaling_policy" "target_scaling_policy_ppasg" {
[DEBUG] ==> Terraform exit code is set to 1
resource "aws_autoscaling_policy" "target_scaling_policy_ppasg" {
for_each = toset(data.aws_autoscaling_groups.ppasg_group.names)
name = each.value
policy_type = "TargetTrackingScaling"
estimated_instance_warmup = var.estimated_instance_warmup
autoscaling_group_name = each.value
target_tracking_configuration {
predefined_metric_specification {
predefined_metric_type = "ASGAverageCPUUtilization"
}
target_value = var.target_value
disable_scale_in = true
}
lifecycle {
create_before_destroy = true
}
}