fix - check stack is ready for cc to be created #1910
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.
Handling creating a change set when the check flag is set to true, and the stack is not in a state to be updated yet e.g
UPDATE_IN_PROGRESS
SUMMARY
When creating a changeset in check_mode for cloudformation, unless the stack is in a ready state e.g
UPDATE_COMPLETE
the cmd will error out.This is particularly a problem in CI pipelines where stacks are being updated constantly and multiple branches with this check are run when the stacks are updating as part of pre deployment testing.
This change waits for the stack to be in a ready state i.e
UPDATE_COMPLETE
prior to moving on to creating the changeset.I think this is more of a bug as I would think this case would be handled by the module but isn't.
ISSUE TYPE
COMPONENT NAME
amazon.aws.cloudformation
ADDITIONAL INFORMATION
As I think I've understood here, all I do is check the status of the stack. If its in
UPDATE_COMPLETE
, continue on to creating the changeset. Otherwise wait like the operation to wait for a create changeset below it.A step-by-step reproduction of the problem
UPDATE_IN_PROGRESS
and immediately run the create changeset with the--check
flag true.UPDATE_IN_PROGRESS
is the status of the stack.Please let me know if I can be of more support in explaining the issue.
Thanks!