Open tonystaark opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Confirmed with the following updates:
1.6.3
5.25.0
aws_autoscaling_policy
If the aws_autoscaling_policy is created without the estimated_instance_warmup and the autoscaling policy still has an empty/default value in the console, The new run of Terraform plan/update shows no changes, Infrastructure up to date. However after updating via the console, Terraform does successfully determine the difference between desired and actual and suggest to update.
I'm running into the same issue with Terraform Core Version 1.6.1 and AWS Provider Version 5.35.0. I don't even have to manually change the target value in the console first. It does this every time I'm updating the target value through Terraform vs creating a brand new policy. It has led to some nasty runaway scale-outs in our case.
New policy:
"requestParameters": {
"autoScalingGroupName": "atl-gen-use1-ingress-asg",
"policyType": "TargetTrackingScaling",
"enabled": true,
"targetTrackingConfiguration": {
"targetValue": 5,
"customizedMetricSpecification": {
"dimensions": [],
"namespace": "VMseries-Ingress-NP",
"metricName": "panSessionSslProxyUtilization",
"statistic": "Average"
},
"disableScaleIn": false
},
"policyName": "atl-gen-use1-ingress-dynamic-policy"
},
Update policy with new Target Value:
"requestParameters": {
"autoScalingGroupName": "atl-gen-use1-ingress-asg",
"policyType": "TargetTrackingScaling",
"enabled": true,
"targetTrackingConfiguration": {
"targetValue": 70,
"customizedMetricSpecification": {
"dimensions": [],
"namespace": "VMseries-Ingress-NP",
"metricName": "panSessionSslProxyUtilization",
"statistic": "Average"
},
"disableScaleIn": false
},
"estimatedInstanceWarmup": 0,
"policyName": "atl-gen-use1-ingress-dynamic-policy",
"cooldown": 0
},
Terraform Core Version
1.3.5
AWS Provider Version
4.62.0
Affected Resource(s)
aws_autoscaling_group aws_autoscaling_policy
Expected Behavior
After updated the preconfigured autoscaling policy target tracking value in the console (from old value to new value), another run of terraform plan should show changes to update the target tracking value back to the old value. Terraform apply should perform the intended change. Nothing else should have changed.
Actual Behavior
The new run of terraform plan/update shows changes to update the target tracking value back to the old value. However after terraform apply, the estimatedInstanceWarmup is updated to zero as well. It was confirmed both on the AWS console and from the Cloudtrail.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None