lib/lono/help/cfn/update.md in lono-4.0.2 vs lib/lono/help/cfn/update.md in lono-4.0.3

- old
+ new

@@ -1,6 +1,33 @@ ## Examples +Let's say we make a simple change to a template, like changing the default InstanceType from `t2.small` to `t2.micro`. Here's what happens when you run `lono cfn update` + +```sh +lono cfn update ec2 +``` + +The output should look similiar to this: + +<img src="/img/tutorials/ec2/cfn-update-instance-type.png" alt="Stack Update" class="doc-photo"> + +Notice that before the update gets performed lono provides a preview of the changes that are about to take place. There are two types of "diffs" in the preview. + +1. Source code diff of the templates. This is generated by downloading the current CloudFormation template and comparing it with the locally generated one using `colordiff`. +2. CloudFormation Change Set list of changes. This is generated using [AWS CloudFormation Change Set](https://medium.com/boltops/a-simple-introduction-to-cloudformation-part-4-change-sets-dry-run-mode-c14e41dfeab7) feature. + +You are prompted with an "Are you sure?" confirmation before lono continues. + +By default, the update command will display a preview of the stack changes before applying the update and prompt to check if you are sure. If you want to bypass the are you sure prompt, use the `--sure` option. + +``` +lono cfn update ec2 --sure +``` + +## Conventions: template and param + +Lono follows some [coventions](http://lono.cloud/docs/conventions/) that helps keep the commands short. We'll go through an example to explain: + Provided that you are in a lono project and have a `my-stack` lono template definition. To update a stack you can simply run: lono cfn update my-stack The above command will generate and use the template in `output/templates/my-stack.json` and parameters in `output/params/my-stack.txt`. The template by convention defaults to the name of the stack. In turn, the params by convention defaults to the name of the template.