-
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
autoscaling/group: Handle eventual consistency #40088
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make testacc PKG=autoscaling TESTS=TestAccAutoScalingGroup_launchTemplateIAMInstanceProfile
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/autoscaling/... -v -count 1 -parallel 20 -run='TestAccAutoScalingGroup_launchTemplateIAMInstanceProfile' -timeout 360m
2024/11/11 16:17:34 Initializing Terraform AWS Provider...
=== RUN TestAccAutoScalingGroup_launchTemplateIAMInstanceProfile
=== PAUSE TestAccAutoScalingGroup_launchTemplateIAMInstanceProfile
=== CONT TestAccAutoScalingGroup_launchTemplateIAMInstanceProfile
--- PASS: TestAccAutoScalingGroup_launchTemplateIAMInstanceProfile (126.71s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling 133.192s
Co-authored-by: Jared Baker <[email protected]>
This functionality has been released in v5.76.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Tossed a comment here wondering for launch templates if this covers version updates. I can always log a separate issue for this - actually wrote up an issue before I found this change :) FWIW though we're probably going to solve this by just forcing the launch template to create everytime rather than using versions (so suffix the name to force this) - this is how our setup previously worked when it used launch configurations we just never got around to moving to launch templates til now. Generally we don't need the versions i.e. if we need to get back to an old version we would just revert the terraform config. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
When using an Auto Scaling group (ASG) with a launch template that specifies an IAM instance profile, changes to the instance profile can cause errors in the ASG due to a lack of built-in waiting for resource consistency. Specifically, if the IAM instance profile is updated, the ASG immediately updates with the outdated configuration before the change has propagated fully, leading to failures.
This pull request addresses the issue by adding wait mechanisms for eventual consistency on the launch template and instance profile resources. Additionally, it introduces a retry mechanism within the ASG to ensure it has the most recent configuration, thus preventing errors caused by timing inconsistencies in resource propagation.
Relations
Closes #24910
References
Output from Acceptance Testing