realestate-com-au / stackup

a simple CLI and Ruby API for AWS CloudFormation
MIT License
97 stars 34 forks source link

Safe handling of the options parameter in create and update stack #65

Closed jitran closed 5 years ago

jitran commented 5 years ago

As per issue https://github.com/realestate-com-au/stackup/issues/64, the create and update stack functions are mutating the options parameter passed to it.

When a stack with bad cloudformation has been created with disable_rollback=true, it completes with an expected state of CREATE_FAILED with no rollback of resources. If you run the same create stack action via stackup, you'd expect it to complete with CREATE_FAILED and no rollbacks.

However, through a sequence of events and function calls, the disable_rollback option has been removed from the original options parameter, thereby causing the second create stack action to fail and rollback.

Tests after code changes:

lukeck commented 5 years ago

Thanks. Looks good to me. Sorry this got lost in end of year madness for a while.