-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
resource/aws_cloudformation_stack_set_instance: Prevents conflicting creation retries #41388
Conversation
… create stack instances
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 🚀
Co-authored-by: Jared Baker <jar-b@users.noreply.github.com>
This functionality has been released in v5.87.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! |
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
The resource
aws_cloudformation_stack_set_instance
was incorrectly retrying creation operations that were already in progress. This was due to a combination of using thetfresource.RetryWhen
function with a wait for completion in the nested function as well as aRetryer
on the AWS service client itself.The function
tfresource.RetryWhen
callsretry.StateChangeConf
, which makes its calls based on a timer even if the previous call is still running. This led to subsequent calls returning anOperationInProgress
error.However, the AWS service client has a
Retryer
handler forOperationInProgress
errors, which retries internally to the AWS client. If the CloudFormation stack takes a long time to complete, this could lead to these internally handledOperationInProgress
errors to exceed the internal retry limit, leading to an error such asRelations
Closes #28675
References
Output from Acceptance Testing
In non-Organization account
In Organization management account