-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Community NoteVoting for Prioritization
For Submitters
|
github-actions
bot
added
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
prioritized
Part of the maintainer teams immediate focus. To be addressed within the current quarter.
labels
Nov 11, 2024
github-actions
bot
added
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
service/iam
Issues and PRs that pertain to the iam service.
service/ec2
Issues and PRs that pertain to the ec2 service.
labels
Nov 11, 2024
jar-b
approved these changes
Nov 11, 2024
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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
prioritized
Part of the maintainer teams immediate focus. To be addressed within the current quarter.
service/autoscaling
Issues and PRs that pertain to the autoscaling service.
service/ec2
Issues and PRs that pertain to the ec2 service.
service/iam
Issues and PRs that pertain to the iam service.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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