Skip to content

Commit

Permalink
Merge pull request #1701 from hashicorp/update-convert-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt authored Apr 11, 2022
2 parents 2dba175 + 5c73652 commit 3cf9fcc
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions website/docs/cdktf/cli-reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,24 @@ This command converts Terraform configuration written in HCL to the equivalent c
```
cdktf convert [OPTIONS]
Converts a single file of HCL configuration to Terraform CDK. Takes the file to be converted on stdin.
Converts a single file of HCL configuration to CDK for Terraform. Takes the file to be converted on stdin.
Options:
--version Show version number [boolean]
--disable-logging Dont write log files. Supported using the env CDKTF_DISABLE_LOGGING.
[boolean] [default: true]
--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]
--language [choices: "typescript", "python", "csharp", "java"] [default: "typescript"]
-h, --help Show help [boolean]
--version Show version number [boolean]
--disable-logging Dont write log files. Supported using the env CDKTF_DISABLE_LOGGING. [boolean] [default: true]
--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]
--language [choices: "typescript", "python", "csharp", "java"] [default: "typescript"]
--provider The conversion needs to know which providers are used in addition to the ones in your cdktf.json file. We search for a cdktf.json below your current working directory.
[array] [default: []]
-h, --help Show help [boolean]
Examples:
cat main.tf | cdktf convert --provider integrations/github Takes the HCL content of main.tf and converts it to CDK for Terraform content and prints it
cat main.tf | cdktf convert --provider hashicorp/aws > imported.ts Takes the HCL content of main.tf and converts it to CDK for Terraform content in imported.ts
cat main.tf | cdktf convert --provider 'hashicorp/aws@ ~>3.62.0' 'integrations/github@ ~>4.16.0' --language Takes the HCL content of main.tf and converts it to CDK for Terraform content in imported.ts
python > imported.py
```

**Examples**
Expand Down

0 comments on commit 3cf9fcc

Please sign in to comment.