Kotaimen / awscfncli

Friendly AWS CloudFormation CLI
MIT License
58 stars 12 forks source link

Initial create ChangeSet failure. #29

Closed Kotaimen closed 6 years ago

Kotaimen commented 6 years ago

When creating new stack with ChangeSet, and the ChangeSet failed, the stack will be stuck in REVIEW_IN_PROGRESS state and the stack must be deleted. In this situation,boto3 always "stack doesn't not exist" in create_change_set call, which is confusing. We can add some code to recognize this situation and return a "stack state is invalid" error to the user.

GlieseRay commented 6 years ago

I think we can add an error handling logic to check the result of create_change_set and delete the stack if it is in REVIEW_IN_PROGRESS state

Kotaimen commented 6 years ago

From CloudFromation doc:

If AWS CloudFormation fails to create the change set and reports the CREATE_FAILED status, fix the error displayed in the Status field, and then create a new change set. At this stage, you can try various configurations and make corrections and changes to your stack before executing the next change set.

So the right behavior is recognize REVIEW_IN_PROGRESS status and continue create "new stack" ChangeSet.