-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: ASG Instance Refresh Rollback Impaired behavior #34189
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Yeh this is a bug in the provider. When triggering an instance refresh, Terraform should not modify the Auto Scaling Group before calling
to the Then the instance refresh will update the ASG to point to the new Launch Template Version IF and only IF the instance refresh succeeded. If it fails; it will use the existing Launch Template Version set on the ASG for the rollback. If you update the launch template version manually beforehand; this confuses any of the rollback logic. In short: The terraform provider should never manually update the launch template parameters on the ASG. Instead it should pass |
The same has to happen for changing In that case |
Terraform Core Version
1.0.5
AWS Provider Version
5.32.1
Affected Resource(s)
aws_autoscaling_group
Expected Behavior
Applying the Autoscaling group with Instance Refresh enabled (i.e. changing launch template version, for example) would trigger the instance refresh to deploy the new configurations, but shouldn't update the configuration beforehand.
In the AWS console, you would see under the "details" tab the old Launch Template Version, while in the Instance Refresh tag it would run with the target configuration being the newer launch template version.
This would imply that in case the new launch template version (2) fails on healthcheck for a while, it would rollback to the previous version (1).
Actual Behavior
Running apply would update the launch template version for the ASG, AND THEN triggers instance refresh with target configuration being the latest launch template version.
This imposes that should the newer launch template version (2) fail on healthcheck for a while, it would "roll back" to the same newer launch template version (2), making the ASG stuck in a perpetual rollback replacing the unhealthy launch template over and over.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
a. The ASG's "Details" tab has changed from Launch Template Version 1 -> 2
b. The ASG's "Instance Refresh" tab shows it's undergoing the procedure
If the new template is unhealthy, you should also see that the instance refresh would fail after an hour, but the rollback would launch the Newer Launch Template Version (2) forever.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: