An AWS CloudFormation stack diff tool
- 🏗️visible and predictable infrastructure deployment outcomes
- 👩💻optimized for human DX
CloudFormation is an awesome fully managed infrastructure as code tool but applying these changes to your existing infrastructure can sometimes have suprising effects. Cliff can help with that.
Cliff is enhances CloudFormation by enabling you to see your changes will look like before you make them 💅 . You can think of cliff as the combination of create changeset + describe changeset + diff packaged into one tool. You can do all of these things without cliff using the aws cli the result will come at the expense of learning to cross stitch and understanding nuances of CloudFormation details 🧶. Cliff does that stitching for you with a display intended for humans.
Basic usage requires two things. The name of an existing stack and a path to a template
$ cliff \
--stack-name your-cloud-formation-stack-name \
path/to/template.yml
💡Cliff will report when there is nothing in the changset between the current stack and the remote stack.
Many CloudFormation templates will employ parameterization for flexibility. By default, cliff will reuse the parameters previously provided but often you'll want to change those for new deployments. In those cases, use the --parameters
or -p
option.
$ cliff \
--stack-name your-cloud-formation-stack-name \
--parameters "Foo=bar" "Baz=boom" "quux=quuz" \
path/to/template.yml
By default cliff will diff --label -u
to compare local and remote templates. If you would like a fancier diff tool, cliff will use the value of
an environment variable CLIFF_DIFFER
instead.
If you are a VS Code user you may want to use CLIFF_DIFFER="code --wait --diff"
If you are a colordiff user you may want to use use CLIFF_DIFFER=colordiff
Cliff leverages the CloudFormation feature of creating a remote changeset to understand and predict the effect of a CloudFormation deployment. In particular you may be interested in what will be added, removed, or modified in you stack before actually deploying your changes.
This is a rustlang application. Go grab yourself a copy with rustup
Meetup Inc 2019