stacks undeploy

Undeploy stacks within the given command path. Also stacks outside the command path that depend on the stacks within the command path are undeployed. Stacks are sorted in undeployment order by stack dependencies so that any given stack is undeployed only after its dependants have been successfully undeployed. Stacks are undeployed in parallel when possible.

Usage

tkm stacks undeploy [command-path] \
[--ignore-dependencies] \
[--interactive|-i]

Positional arguments

OptionRequiredDescription
command-pathno
Undeploy stacks within the given command path. Defaults to the root stack group path ("/").

Options

This command supports the following options.

OptionRequiredDescription
--ignore-dependenciesno
Ignore stack dependencies. By default, when a stack is undeployed, its dependants are undeployed first, and then the stack itself. In some exceptional cases, you might want to undeploy just one stack and skip its dependants.

Bear in mind that this option is supported only when exactly one stack is undeployed. Ignoring dependants may lead into unexpected results, so you should use this option only in exceptional circumstances.
--interactive
-i
no
Choose the command path using autocompleting search.

Common Options

This command supports the following common options.

OptionRequiredDescription
--helpno
Show help.
--yes
-y
no
Automatic yes to prompts; assume "yes" as an answer to all prompts and run non-interactively.
--profile PROFILEno
Use a profile configured in ~/.aws/credentials file.
--log LEVELno
Set logging level. Allowed values are "trace", "debug", "info", "warn", "error". Defaults to "info".
--dir DIR
-d DIR
no
Set the project directory from where Takomo loads configuration.
--load-aws-sdk-configno
Instead of using profiles configured in ~/.aws/credentials, use profiles found from ~/.aws/config.
--var name=VALUEno
Set variable that can be referenced in configuration files. This option can be used multiple times to set multiple variables.
--var-file FILE
--var-file name=FILE
no
Load variables from a file. The variables can be referenced in configuration files. This option can be used multiple times to load variables from multiple files. If NAME is given, variables are loaded to a variable with that name.
--env-file FILEno
Load environment variables from a file. The variables can be referenced in configuration files. This option can be used multiple times to load variables from multiple files.
--log-confidential-infono
Allow printing of environment variables and confidential parameter values that are concealed from the logs by default.
--statsno
Print statistics information of the executed command.

Examples

Undeploy all stacks:

tkm stacks undeploy

Undeploy within the given command path:

tkm stacks undeploy /dev

Undeploy only /dev/vpc.yml stack and its dependants:

tkm stacks undeploy /dev/vpc.yml

The region part must be specified if the stack has more than one region and you want to undeploy it from only one region.

tkm stacks undeploy /dev/vpc.yml/eu-west-1

Undeploy exactly one stack and skip its dependants:

tkm stacks undeploy /cloudtrail.yml --ignore-dependencies