From dedfbf6027dabb345fed5db3de6132439edf6740 Mon Sep 17 00:00:00 2001 From: Mutahhir Hayat Date: Fri, 23 May 2025 12:36:56 +0200 Subject: [PATCH] Update CDKTF CLI flag changes for upcoming release --- .../docs/cdktf/cli-reference/commands.mdx | 166 +++++++++--------- 1 file changed, 86 insertions(+), 80 deletions(-) diff --git a/content/terraform-cdk/v0.20.x/docs/cdktf/cli-reference/commands.mdx b/content/terraform-cdk/v0.20.x/docs/cdktf/cli-reference/commands.mdx index 7f4e4426b5..ebdf330db0 100644 --- a/content/terraform-cdk/v0.20.x/docs/cdktf/cli-reference/commands.mdx +++ b/content/terraform-cdk/v0.20.x/docs/cdktf/cli-reference/commands.mdx @@ -150,36 +150,38 @@ cdktf deploy [stacks...] Deploy the given stacks Positionals: - stacks Deploy stacks matching the given ids. Required when more than one stack is present in the app [array] [default: []] + stacks Deploy stacks matching the given ids. Required when more than one stack is present in the app [array] [default: []] Options: - --version Show version number [boolean] + --version Show version number [boolean] --experimental-provider-schema-cache-path An experimental schema cache that can be used to improve the speed of cdktf get and convert. Supported using the env - CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] + CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] --disable-plugin-cache-env Dont set TF_PLUGIN_CACHE_DIR automatically. This is useful when the plugin cache is configured differently. Supported using the env - CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] - --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] - --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard - out at the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY - -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] - -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] - --auto-approve Auto approve [boolean] [default: false] - --outputs-file Path to file where stack outputs will be written as JSON [string] - --outputs-file-include-sensitive-outputs Whether to include sensitive outputs in the output file [boolean] [default: false] - --ignore-missing-stack-dependencies Don't check if all stacks specified in the command have their dependencies included as well [boolean] [default: false] - --parallelism Number of concurrent CDKTF stacks to run. Defaults to infinity, denoted by -1 [number] [default: -1] - --refresh-only Select the "refresh only" planning mode, which checks whether remote objects still match the outcome of the most recent Terraform apply - but does not propose any actions to undo any changes made outside of Terraform. [boolean] [default: false] + CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] + --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] + --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard out at + the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY + -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] + -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] + --auto-approve Auto approve [boolean] [default: false] + --outputs-file Path to file where stack outputs will be written as JSON [string] + --outputs-file-include-sensitive-outputs Whether to include sensitive outputs in the output file [boolean] [default: false] + --ignore-missing-stack-dependencies Don't check if all stacks specified in the command have their dependencies included as well [boolean] [default: false] + --parallelism Number of concurrent CDKTF stacks to run. Defaults to infinity, denoted by -1 [number] [default: -1] + --refresh-only Select the "refresh only" planning mode, which checks whether remote objects still match the outcome of the most recent Terraform apply but does + not propose any actions to undo any changes made outside of Terraform. [boolean] [default: false] --terraform-parallelism Forwards value as the `-parallelism` flag to Terraform. By default, the this flag is not forwarded to Terraform. Note: This flag is not - supported by remote / cloud backend [number] [default: -1] - --no-color Disables terminal formatting sequences in the output. [boolean] [default: false] - --migrate-state Pass this flag after switching state backends to approve a state migration for all targeted stacks [boolean] [default: false] - --var Set a value for one of the input variables in the stack or stacks to apply. Use this option more than once to set more than one - variable. [array] [default: []] - --var-file Load variable values from the given file, in addition to the default files terraform.tfvars and *.auto.tfvars. Use this option more - than once to include more than one variables file. [array] [default: []] - --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] - -h, --help Show help [boolean] + supported by remote / cloud backend [number] [default: -1] + --no-color Disables terminal formatting sequences in the output. [boolean] [default: false] + --migrate-state Pass this flag after switching state backends to approve a state migration for all targeted stacks [boolean] [default: false] + --var Set a value for one of the input variables in the stack or stacks to apply. Use this option more than once to set more than one variable. + [array] [default: []] + --var-file Load variable values from the given file, in addition to the default files terraform.tfvars and *.auto.tfvars. Use this option more than once to + include more than one variables file. [array] [default: []] + --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] + --skip-provider-lock Block `terraform provider lock` from being run for any reason. Warning: This may cause issues when used with HCP Terraform + [boolean] [default: false] + -h, --help Show help ``` ~> **Note:** The `parallelism` flag has a different behavior than the [terraform parallelism flag](/terraform/cli/commands/apply#parallelism-n). To set the custom terraform parallelism flag, please use the `--terraform-parallelism` flag instead. @@ -236,32 +238,34 @@ cdktf destroy [stacks..] Destroy the given stacks Positionals: - stacks Destroy stacks matching the given ids. Required when more than one stack is present in the app [array] [default: []] + stacks Destroy stacks matching the given ids. Required when more than one stack is present in the app [array] [default: []] Options: - --version Show version number [boolean] + --version Show version number [boolean] --experimental-provider-schema-cache-path An experimental schema cache that can be used to improve the speed of cdktf get and convert. Supported using the env - CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] + CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] --disable-plugin-cache-env Dont set TF_PLUGIN_CACHE_DIR automatically. This is useful when the plugin cache is configured differently. Supported using the env - CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] - --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] - --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard - out at the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY - -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] - -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] - --auto-approve Auto approve [boolean] [default: false] - --ignore-missing-stack-dependencies Don't check if all stacks specified in the command have their dependencies included as well [boolean] [default: false] - --parallelism Number of concurrent CDKTF stacks to run. Defaults to infinity, denoted by -1 [number] [default: -1] + CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] + --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] + --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard out at + the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY + -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] + -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] + --auto-approve Auto approve [boolean] [default: false] + --ignore-missing-stack-dependencies Don't check if all stacks specified in the command have their dependencies included as well [boolean] [default: false] + --parallelism Number of concurrent CDKTF stacks to run. Defaults to infinity, denoted by -1 [number] [default: -1] --terraform-parallelism Forwards value as the `-parallelism` flag to Terraform. By default, the this flag is not forwarded to Terraform. Note: This flag is not - supported by remote / cloud backend [number] [default: -1] - --var Set a value for one of the input variables in the stack or stacks to apply. Use this option more than once to set more than one - variable. [array] [default: []] - --var-file Load variable values from the given file, in addition to the default files terraform.tfvars and *.auto.tfvars. Use this option more - than once to include more than one variables file. [array] [default: []] - --no-color Disables terminal formatting sequences in the output. [boolean] [default: false] - --migrate-state Pass this flag after switching state backends to approve a state migration for all targeted stacks [boolean] [default: false] - --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] - -h, --help Show help [boolean] + supported by remote / cloud backend [number] [default: -1] + --var Set a value for one of the input variables in the stack or stacks to apply. Use this option more than once to set more than one variable. + [array] [default: []] + --var-file Load variable values from the given file, in addition to the default files terraform.tfvars and *.auto.tfvars. Use this option more than once to + include more than one variables file. [array] [default: []] + --no-color Disables terminal formatting sequences in the output. [boolean] [default: false] + --migrate-state Pass this flag after switching state backends to approve a state migration for all targeted stacks [boolean] [default: false] + --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] + --skip-provider-lock Block `terraform provider lock` from being run for any reason. Warning: This may cause issues when used with HCP Terraform + [boolean] [default: false] + -h, --help Show help ``` ~> **Note:** The `parallelism` flag has a different behavior than the [terraform parallelism flag](/terraform/cli/commands/apply#parallelism-n). To set the custom terraform parallelism flag, please use the `--terraform-parallelism` flag instead. @@ -316,31 +320,32 @@ cdktf diff [stack] Perform a diff (terraform plan) for the given stack Positionals: - stack Diff stack which matches the given id only. Required when more than one stack is present in the app [string] + stack Diff stack which matches the given id only. Required when more than one stack is present in the app [string] Options: - --version Show version number [boolean] + --version Show version number [boolean] --experimental-provider-schema-cache-path An experimental schema cache that can be used to improve the speed of cdktf get and convert. Supported using the env - CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] + CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] --disable-plugin-cache-env Dont set TF_PLUGIN_CACHE_DIR automatically. This is useful when the plugin cache is configured differently. Supported using the env - CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] - --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] - --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard - out at the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY - -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] - -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] - --refresh-only Select the "refresh only" planning mode, which checks whether remote objects still match the outcome of the most recent Terraform apply - but does not propose any actions to undo any changes made outside of Terraform. [boolean] [default: false] + CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] + --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] + --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard out at + the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY + -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] + -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] + --refresh-only Select the "refresh only" planning mode, which checks whether remote objects still match the outcome of the most recent Terraform apply but does + not propose any actions to undo any changes made outside of Terraform. [boolean] [default: false] --terraform-parallelism Forwards value as the `-parallelism` flag to Terraform. By default, the this flag is not forwarded to Terraform. Note: This flag is not - supported by remote / cloud backend [number] [default: -1] - --var Set a value for one of the input variables in the stack. Use this option more than once to set more than one variable. - [array] [default: []] - --var-file Load variable values from the given file, in addition to the default files terraform.tfvars and *.auto.tfvars. Use this option more - than once to include more than one variables file. [array] [default: []] - --no-color Disables terminal formatting sequences in the output. [boolean] [default: false] - --migrate-state Pass this flag after switching state backends to approve a state migration for the targeted stack [boolean] [default: false] - --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] - -h, --help Show help [boolean] + supported by remote / cloud backend [number] [default: -1] + --var Set a value for one of the input variables in the stack. Use this option more than once to set more than one variable. [array] [default: []] + --var-file Load variable values from the given file, in addition to the default files terraform.tfvars and *.auto.tfvars. Use this option more than once to + include more than one variables file. [array] [default: []] + --no-color Disables terminal formatting sequences in the output. [boolean] [default: false] + --migrate-state Pass this flag after switching state backends to approve a state migration for the targeted stack [boolean] [default: false] + --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] + --skip-provider-lock Block `terraform provider lock` from being run for any reason. Warning: This may cause issues when used with HCP Terraform + [boolean] [default: false] + -h, --help Show help ``` ~> **Note:** The `parallelism` flag has a different behavior than the [terraform parallelism flag](/terraform/cli/commands/plan#parallelism-n). To set the custom terraform parallelism flag, please use the `--terraform-parallelism` flag instead. @@ -650,24 +655,25 @@ cdktf output [stacks..] Prints the output of stacks Positionals: - stacks Get outputs of the stacks matching the given ids. Required when more than one stack is present in the app [array] [default: []] + stacks Get outputs of the stacks matching the given ids. Required when more than one stack is present in the app [array] [default: []] Options: - --version Show version number [boolean] + --version Show version number [boolean] --experimental-provider-schema-cache-path An experimental schema cache that can be used to improve the speed of cdktf get and convert. Supported using the env - CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] + CDKTF_EXPERIMENTAL_PROVIDER_SCHEMA_CACHE_PATH. [string] [default: false] --disable-plugin-cache-env Dont set TF_PLUGIN_CACHE_DIR automatically. This is useful when the plugin cache is configured differently. Supported using the env - CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] - --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] - --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard - out at the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY - -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] - -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] - --outputs-file Path to file where stack outputs will be written as JSON [string] - --outputs-file-include-sensitive-outputs Whether to include sensitive outputs in the output file [boolean] [default: false] - --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] - -h, --help Show help [boolean] -➜ + CDKTF_DISABLE_PLUGIN_CACHE_ENV. [boolean] [default: false] + --log-level Which log level should be written. Only supported via setting the env CDKTF_LOG_LEVEL [string] + --log-file-directory The directory path where CDKTF should create `cdktf.log` and print logs at the `debug` level. If not set, CDKTF writes logs to standard out at + the level specified in `CDKTF_LOG_LEVEL`. Only supported via setting the env CDKTF_LOG_FILE_DIRECTORY + -a, --app Command to use in order to execute cdktf app [required] [default: "npx ts-node main.ts"] + -o, --output Output directory for the synthesized Terraform config [required] [default: "cdktf.out"] + --outputs-file Path to file where stack outputs will be written as JSON [string] + --outputs-file-include-sensitive-outputs Whether to include sensitive outputs in the output file [boolean] [default: false] + --skip-synth Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date [boolean] [default: false] + --skip-provider-lock Block `terraform provider lock` from being run for any reason. Warning: This may cause issues when used with HCP Terraform + [boolean] [default: false] + -h, --help Show help ``` ### `--outputs-file`