-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Usage
The CLI has following main commands.
Initialises an instance of BetterCF in the configured AWS account. The IAM role/user must have permissions to create S3 buckets, CloudFormation stacks and SSM parameters. A least-privilege policy will be provided in the future.
bettercf init [-h] [--mode {standard,compliance,governance}]
options:
-h, --help show this help message and exit
--mode {standard,compliance,governance}, -m {standard,compliance,governance}
Initialises BetterCF in standard, compliance or governance mode.- The
standardmode is selected by default if a--modeisn't provided.
Deletes all BetterCF's AWS resources in the configured account.
bettercf teardown [-h] [--force]
options:
-h, --help show this help message and exit
--force, -f Will attempt to empty S3 buckets before teardown. Note this will still fail if BetterCF was initialized in "compliance"
or "governance" mode. You must delete all S3 objects manually.- It will be sad to see you go!
Combines the contents of multiple files to produce a single template file, using dfm
bettercf template build [-h] --name NAME --dfm-config-path DFM_CONFIG_PATH --dfm-root-path DFM_ROOT_PATH
options:
-h, --help show this help message and exit
--name NAME, -n NAME name of the template
--dfm-config-path DFM_CONFIG_PATH, -c DFM_CONFIG_PATH
complete local path to a dfm config file defining the file merge.
--dfm-root-path DFM_ROOT_PATH, -r DFM_ROOT_PATH
complete local path to the root path the dfm merge should start from.If you are using the recommended directory structure for your project, and including this optional build step, the dfm config file found at /.dfm/template_builder.json should be fine. Your dfm root path should be to the directory that contains a directory per template.
Pushes your single CloudFormation template file into BetterCF's Template Repository within your AWS account.
bettercf template push [-h] --name NAME --template-path TEMPLATE_PATH [--template-version TEMPLATE_VERSION]
options:
-h, --help show this help message and exit
--name NAME, -n NAME name of the template
--template-path TEMPLATE_PATH, -t TEMPLATE_PATH
complete local path to the CloudFormation template to push.
--template-version TEMPLATE_VERSION, -v TEMPLATE_VERSION
The version tag that this template should be pushed with. E.g "1.0.0".Remember pushing to a BetterCF instance in compliance mode will mean these templates are immutable and cannot be deleted for 10 years.
Deploys a new, or updates an existing AWS CloudFormation stack in the configured AWS account.
bettercf template push [-h] --name NAME --template-path TEMPLATE_PATH [--template-version TEMPLATE_VERSION]
options:
-h, --help show this help message and exit
--name NAME, -n NAME name of the template
--template-path TEMPLATE_PATH, -t TEMPLATE_PATH
complete local path to the CloudFormation template to push.
--template-version TEMPLATE_VERSION, -v TEMPLATE_VERSION
The version tag that this template should be pushed with. E.g "1.0.0".
(cloudformation-state-management-py3.11) bash-3.2$ python src/cli.py stack deploy --help
usage: cli.py stack deploy [-h] --stack-config-path STACK_CONFIG_PATH
options:
-h, --help show this help message and exit
--stack-config-path STACK_CONFIG_PATH, -c STACK_CONFIG_PATH
complete path to the stack config file.To understand what is required inside a stack configuration file, see here