[PR #1790/2c917689 backport][stable-5] cloudformation_stack_set - Add a waiter to ensure that running operations against existing stacksets complete #1806
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.
This is a backport of PR #1790 as merged into main (2c91768).
SUMMARY
Add a waiter to ensure that running operations against existing stacksets complete. Current code would fail in cases where new instances need to be added since the previous
update_stack_set(module, stack_params, cfn)
would still be running.Fixes #1608
ISSUE TYPE
COMPONENT NAME
cloudformation_stack_set
ADDITIONAL INFORMATION
I initially thought that the module was not idempotent since new instances wouldn't be added to my existing stack sets. Upon closer examination, the issue had to do with the fact that we had prior calls being made before adding new instances to existing stack sets:
The error got triggered because of a missing waiter after this operation:
This change add a waiter function after the update operation, which, in turn, ensure that the subsequent call to add stack instances to the stack set properly run.