org accounts undeploy
Undeploy infrastructure from organization accounts. The infrastructure to undeploy is configured with config sets.
Under the hood, the undeploy stacks command is used.
The local organization configuration must be in sync with the actual organization state before this command can be run.
Usage
tkm org accounts undeploy [org-unit-path...] [--account <account_id>]...
Positional arguments
Option | Required | Description |
---|---|---|
org-unit-path | no | You can pass one or more organizational unit paths to undeploy only the accounts that belong to organizational units located under the given paths in the organization hierarchy. |
Options
Option | Required | Description |
---|---|---|
--account | no | Choose accounts to undeploy. You can use this option mutliple times to specify more accounts. |
Common Options
Option | Required | Description |
---|---|---|
--help | no | Show help. |
--yes -y | no | Automatic yes to prompts; assume "yes" as an answer to all prompts and run non-interactively. |
--profile PROFILE | no | Use a profile configured in ~/.aws/credentials file. |
--log LEVEL | no | 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-config | no | Instead of using profiles configured in ~/.aws/credentials, use profiles found from ~/.aws/config. |
--var name=VALUE | no | 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 FILE | no | 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-info | no | Allow printing of environment variables and confidential parameter values that are concealed from the logs by default. |
--stats | no | Print statistics information of the executed command. |
Examples
Undeploy all accounts in the organization.
tkm org accounts undeploy
Undeploy only accounts that belong to the organizational unit Root/Sandbox or to any organizational units under it.
tkm org accounts undeploy Root/Sandbox
Undeploy only accounts that belong to the organizational unit Root/Apps/Dev or Root/Apps/Test, or to any organizational units under them.
tkm org accounts undeploy Root/Apps/Dev Root/Apps/Test
Undeploy only account 123456789012.
tkm org accounts undeploy --account 123456789012
Undeploy only account 123456789012 and 777777777777.
tkm org accounts undeploy --account 123456789012 --account 777777777777