lono cfn preview
Usage
lono cfn preview STACK
Description
Preview a CloudFormation stack update. This is similar to terraform’s plan or puppet’s dry-run mode.
Examples
We’ll make a change to the default InstanceType of a CloudFromation stack.
lono cfn preview my-stack
The output should look similiar to this:
Generating CloudFormation source code diff...
Running: colordiff /tmp/existing_cfn_template.yml output/templates/ec2.yml
14c14
< Default: t2.small
---
> Default: t2.micro
Generating CloudFormation Change Set for preview.....
CloudFormation preview for 'ec2' stack update. Changes:
Modify AWS::EC2::Instance: EC2Instance i-07e939db65120fb75
The preview includes colors:
There are two types of “diffs” in the preview.
- 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
. - CloudFormation Change Set list of changes. This is generated using AWS CloudFormation Change Set feature.
Options
[--rollback], [--no-rollback] # rollback
# Default: true
[--source=SOURCE] # url or path to file with template
[--blueprint=BLUEPRINT] # override convention and specify the template file to use
[--capabilities=one two three] # iam capabilities. Ex: CAPABILITY_IAM, CAPABILITY_NAMED_IAM
c, [--config=CONFIG] # override convention and specify both the param and variable file to use
[--iam], [--no-iam] # Shortcut for common IAM capabilities: CAPABILITY_IAM, CAPABILITY_NAMED_IAM
p, [--param=PARAM] # override convention and specify the param file to use
[--tags=key:value] # Tags for the stack. IE: Name:api-web Owner:bob
[--template=TEMPLATE] # override convention and specify the template file to use
v, [--variable=VARIABLE] # override convention and specify the variable file to use
[--change-set], [--no-change-set] # Uses generated change set to update the stack. If false, will perform normal update-stack.
# Default: true
[--changeset-preview], [--no-changeset-preview] # Show ChangeSet changes preview.
# Default: true
[--codediff-preview], [--no-codediff-preview] # Show codediff changes preview.
# Default: true
[--param-preview], [--no-param-preview] # Show parameter diff preview.
# Default: true
[--keep], [--no-keep] # keep the changeset instead of deleting it afterwards
[--verbose], [--no-verbose]
[--noop], [--no-noop]
Edit this page
See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!
- Suggest an edit to this page (here's the contributing guide).
- Open an issue about this page to report a problem.