-
Notifications
You must be signed in to change notification settings - Fork 2
CloudFormation
All CloudFormation related action support alternate profile and region. Configure them through the fzfaws.yml config file
or you could pass in command line options. The command line option takes higher precedence and will override the config file settings.
For more information about priority, checkout here.
fzfaws cloudformation create --profile --regionConfigure fzfaws.yml to set default profile and region for all CloudFormation actions, this will override the global settings of profile and region.
In the example below, the default profile and us-east-1 will be used for all other services, but CloudFormation service will use the root profile and us-east-2 by default.
global:
profile: default
region: us-east-1
services:
s3:
profile: root
region: us-east-2Reference individual option flag through fzfaws cloudformation create --help.
Without any arguments:
- Select a S3 bucket
- Select a cloudformation template in the bucket
- Enter the name for the new stack
- Enter parameter value for the new stack (if parameter is a list type, you can use TAB to multi select)
- Stack will be created
fzfaws cloudformation createChoose a specific version of the template if bucket has versioning enabled.
fzfaws cloudformation create --versionConfigure extra settings when creating a stack, including: Tags, IAM roles, Notifications, StackPolicy, RollbackConfiguration, CreationOption. They resembles the settings you can configure in AWS console. Use TAB to multi select.
fzfaws cloudformation create --extraYou could wait for stack creation to complete, checkout #wating-for-stack-operation-to-complete.
Create a stack using a template in current directory.
fzfaws cloudformation create --localTo list files from home directory, you could use the --root flag. Note: it is extremely slow and resource intensive
if you don't have fd installed to search from home directory, install fd before using this flag.
fzfaws cloudformation create --local --root
Reference individual option flag through fzfaws cloudformation update --help.
Without any arguments:
- Select a CloudFormation stack
- Update existing parameter
- Stack will be updated
fzfaws cloudformation updateUpdate extra settings when updating a stack, including: Tags, IAM roles, Notifications, StackPolicy, RollbackConfiguration. They resembles the settings you can configure in AWS console. Use TAB to multi select.
fzfaws cloudformation update --extraYou could wait for stack update to complete, checkout #wating-for-stack-operation-to-complete.
You can choose to replace the template during update, mechanics are the same as creating a stack.
fzfaws cloudformation update --replaceSame as creating a stack, you can choose to use a version of a template in S3.
fzfaws cloudformation update --replace --versionA full example to do a replacing update using a template in local machine as well as configuring extra settings and wait for the operation to complete.
fzfaws cloudformation update --replace --local --root --extra --wait
Reference individual option flag through fzfaws cloudformation delete --help.
Without any arguments:
- Select a CloudFormation stack
- Stack will be deleted
fzfaws cloudformation deleteUse a specific IAM role that has the permission to delete the current stack. Useful if you have associate a role with the stack.
fzfaws cloudformation delete --iamYou could wait for stack deletion to complete, checkout #wating-for-stack-operation-to-complete.
Reference individual option flag through fzfaws cloudformation changeset --help.
Without any arguments:
- Select a CloudFormation stack
- Enter a name and description for the changeset
- Enter new parameters
- Changset will be created
fzfaws cloudformation changesetConfigure extra settings when creating a changeset, including: Tags, IAM roles, Notifications, RollbackConfiguration. They resemble the settings you can configure in AWS console. Use TAB to multi select.
fzfaws cloudformation changeset --extraYou could wait for stack changeset creation to complete, checkout #wating-for-stack-operation-to-complete.
View results of the changeset.
fzfaws cloudformation changeset --infoExecute a changeset to trigger a stack update.
fzfaws cloudformation changeset --executeDelete a changeset.
fzfaws cloudformation changeset --deleteUnder the hood, this is using a #replacing-update. So same options and mechanics are applied when creating a replacing update changeset.
fzfaws cloudformation changeset --replaceA full example to create a replacing changeset using a template in current machine and also wait for the changeset to finish create.
fzfaws cloudformation changeset --replace --local --waitReference individual option flag through fzfaws cloudformation drift --help.
Without any arguments:
- Select a CloudFormation stack
- A drift detection will init on the selected stack
fzfaws cloudformation driftDetect drift on a specific resource in a stack, support multi selection.
fzfaws cloudformation drift --selectView the current drift status.
fzfaws cloudformation drift --infoYou could wait for drift detection to complete, checkout #wating-for-stack-operation-to-complete.
Reference individual option flag through fzfaws cloudformation validate --help.
Without any arguments:
- Select a S3 bucket
- Select a template in the bucket
- The template will be validated
fzfaws cloudformation validateValidate a version of a template in a versioning enabled S3 bucket.
fzfaws cloudformation validate --versionfzfaws cloudformation validate --localTo list files from home directory, you could use the --root flag. Note: it is extremely slow and resource intensive if you don't have fd installed to search from home directory, install fd before using this flag.
fzfaws cloudformation validate --local --rootCheckout the dedicated section for extending fzfaws functionalities which explains how and why for the ls commands. The ls command will just print out information without doing any actions. Consult the help manual to see the available options.
fzfaws cloudformation ls --helpApply --wait flag to wait for stack operation to complete before exiting fzfaws.
fzfaws cloudformation create --waitIt is recommended to add --wait as a default argument for CloudFormation operations.
services:
s3:
default_args:
create: --wait
update: --wait
delete: --wait
changeset: --wait
drift: --waitCheckout the explanation in S3 wiki which
explains the syntax of how to use the --bucket flag.
The difference is CloudFormation operations uses --bucket instead of --bucketpath option in S3 operations.
fzfaws cloudformation create --bucket bucket1/folder1/template.json --wait --extra