realestate-com-au / stackup

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

Change Sets support #24

Closed aidansteele closed 6 years ago

aidansteele commented 8 years ago

CloudFormation recently added support for change sets. It would be great to see this trickle down to stackup, one of my favourite gems :+1:

mdub commented 8 years ago

This is a most excellent idea. Any thoughts on what the API, CLI, and workflow would look like?

mdub commented 7 years ago

So, it seems the primary actions might be:

Following my usual "RESTful CLI" style, I'd probably do something like:

stackup NAME make-change -t ... -p ...
stackup NAME changes
stackup NAME change ID show
stackup NAME change ID apply
stackup NAME change ID delete

A more conventional alternative could be

stackup NAME change create -t ... -p ...
stackup NAME change list
stackup NAME change show ID
stackup NAME change apply ID
stackup NAME change delete ID
mdub commented 7 years ago

Oh ... it seems change-set IDs are unique across stacks, so for those last three commands, the stack NAME is redundant.

In retrospect, I'm wishing I'd following the "RESTful CLI" approach from the get-go, e.g.

stackup stacks
stackup stack NAME up -t ... -p ...
stackup stack NAME diff -t ... -p ...
stackup stack NAME down
stackup stack NAME change -t ... -p ...
stackup stack NAME changes
stackup change ID show
stackup change ID apply
stackup change ID delete

I wonder if it might be possible to move to such a scheme, while retaining backward-compatibility.

Alternatively, I could build such functionality into swa.

mdub commented 6 years ago

Implemented in #46.

mdub commented 6 years ago

FWIW, I went with:

stackup NAME change-sets
stackup NAME change-set create -t template.json
stackup NAME change-set create --name CUSTOM_NAME -t template.json
stackup NAME change-set inspect
stackup NAME change-set apply
stackup NAME change-set delete