browse
cdktf/

CDK for Terraform CLI

HashiCorp

Define infrastructure using familiar programming languages with CDK for Terraform.

Infrastructure as Code
01Agent Notes

cdktf wraps Terraform with programming language support. Key commands: init (scaffold), synth (generate HCL), deploy (apply), destroy, diff (plan). Runs `terraform` under the hood. Use `cdktf synth` to generate Terraform JSON, then inspect with terraform commands for structured output.


02Global Flags
FlagTypeDescription
--log-levelenum [debug, info, warn, error]Logging verbosity level
--no-colorbooleanDisable color output

03Authentication
Methods
environment-variablesconfig-file
Env vars
TF_VAR_*CDKTF_LOG_LEVEL
Config files
~/.terraformrc
Setupcdktf init

04Install
npm install -g cdktf-cli

05Capabilities
Reference
binarycdktf
checkcdktf --version
authenvironment-variables, config-file
formatstext
version0.21.0