Getting Started With Terraform Cloud Development Kit

The Terraform Cloud Development Kit (CDKTF) lets you define infrastructure using TypeScript, Python, Java, C#, or Go. Code is synthesised into Terraform JSON configuration, then applied with the standard Terraform workflow.

When It Helps

  • Teams with strong software engineering practices (unit tests, dependency injection) who prefer general-purpose languages over HCL.
  • Reusable abstractions across environments (construct libraries) to reduce duplication.
  • Integration with existing package registries (npm, PyPI, Maven) for distributing infrastructure components.

Considerations

  • Generated stacks can mask Terraform diffs—use cdktf diff to inspect changes before cdktf deploy.
  • HCL experts may still prefer traditional modules for transparency; CDKTF adds a language runtime dependency.
  • Plan state management as usual (remote state, locking, workspaces); CDKTF does not replace Terraform Enterprise.

Quick Start

  1. Install the CLI: npm install -g cdktf-cli.
  2. Initialise a project: cdktf init --template=typescript --local.
  3. Define constructs in code, synthesise with cdktf synth, and deploy with cdktf deploy.

Resources