Kotaimen / awscfncli

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

Declining to execute a Change Set should not exit #77

Closed alytle closed 5 years ago

alytle commented 5 years ago

Hey folks,

When I run cfn-cli stack sync --confirm, I often just want to inspect the change set, and not execute it. The --confirm option helps here, but if I have multiple stacks, when I get to this point:

Do you want to execute ChangeSet? [y/N]: N

The program exits when I hit no. I'd like it to continue progressing through the rest of the stacks in question. Do you think this should be a default behaviour? If not, I'd be fine with a parameter override to get the behaviour in question.

Additionally, it doesn't seem like the output of Change Sets is accessible after the sync command completes? Would you be open to a PR there to be able to revisit an existing Change Set?

Kotaimen commented 5 years ago

Hi Alytle:

I agree the --confirm behavior is not ideal behavior in this case, it should ask once for every stack, I'll try to fix this.

Regarding specifying change sets, you can add back commands like changeset list, changeset describe. The changeset feature was in earlier version but eventually replaced with sync as I'm focusing on assist writing template for this tool.

-- Kotaimen

alytle commented 5 years ago

Ok, I wasn't sure if you were opposed to the changeset command being re-introduced. I like the sync command, but sometimes you just need a changeset itself. I'll take a stab at a PR this week.

alytle commented 5 years ago

Edit: I found --ignore-missing shortly after writing this. I'd suggest this should be made a default :)

Also, and I'm not sure if this is worth including in a separate issue, but a good number of "error" states are specific only to a given stack, and not the entire plan.

For example:

An error occurred (ValidationError) when calling the DescribeStacks operation: Stack with id foobar-dev does not exist

Really the plan should continue, given that the end result was that the Stack should be deleted, and it is already in that state.

Kotaimen commented 5 years ago

--ingore-missing option is kinda of an after thought and default to disabled so the previous behavior is not changed.