Skip to content
aicoolies logo
CDKTF logo

CDKTF

HashiCorp's Cloud Development Kit for defining Terraform with code

CDKTF (Cloud Development Kit for Terraform) lets developers define infrastructure using TypeScript, Python, Java, C#, or Go instead of HCL. It synthesizes familiar programming language constructs into standard Terraform JSON configuration. Developed by HashiCorp, it brings software engineering patterns like loops, conditionals, and abstractions to infrastructure definition with full IDE support.

About CDKTF

CDKTF bridges the gap between application development and infrastructure management by allowing developers to define cloud resources using the programming languages they already know. Instead of learning HCL syntax and its declarative conventions, teams write TypeScript, Python, Java, C#, or Go code that defines infrastructure through imported constructs representing Terraform providers and resources. The CDKTF synthesizer then converts this code into standard Terraform JSON that the Terraform CLI executes normally.

The code-first approach unlocks software engineering patterns that are difficult or impossible in HCL. Developers can use loops to generate multiple similar resources, conditionals to adjust configurations based on environment variables, class inheritance to create reusable infrastructure abstractions, and unit testing frameworks to validate infrastructure logic before deployment. Full IDE support including autocomplete, type checking, and inline documentation makes infrastructure code as discoverable as application code.

CDKTF integrates with the entire Terraform ecosystem including all existing providers, modules, and state backends. Teams can incrementally adopt CDKTF alongside existing HCL configurations, converting modules one at a time rather than requiring a complete rewrite. The framework is developed by HashiCorp and maintained as part of the official Terraform ecosystem, ensuring long-term compatibility with Terraform's evolution including support for OpenTofu as an alternative backend.

Pricing & Platform Specs

Pricing Summary

100% free and open source under the Mozilla Public License 2.0 (MPL-2.0) with $0 software licensing fees. CDKTF enables defining Terraform infrastructure in TypeScript, Python, Go, C#, and Java. (Note: HashiCorp officially deprecated and archived the CDKTF repository in December 2025 in favor of standard HCL and HCP Terraform workflows, though the codebase remains open source and functional for existing syntheses). Executing synthesized Terraform JSON configurations incurs standard cloud infrastructure fees and optional HCP Terraform / Terraform Cloud tier costs if utilized for remote state execution.

full pricing breakdown →

Supported Platforms

TypeScript, Python, Java, C#, Go, any OS

Explore categories, tags & use cases

Production-grade Terraform modules and infrastructure library

Gruntwork provides a library of battle-tested, production-grade Terraform modules covering AWS, GCP, and Azure infrastructure patterns. Modules handle networking, compute, databases, security, monitoring, and compliance with best practices built in. Terragrunt, their open-source Terraform wrapper with 15k+ stars, adds DRY configuration, remote state management, and multi-account orchestration.

paid

Infrastructure as Code orchestration and governance platform

env0 is an IaC orchestration platform that manages Terraform, OpenTofu, Pulumi, and CloudFormation workflows with built-in governance, cost estimation, and drift detection. It provides self-service infrastructure provisioning with policy guardrails, automated plan approvals, and budget controls. Supports custom deployment flows with OPA-based policy enforcement and RBAC.

freemium

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is CDKTF?

CDKTF (Cloud Development Kit for Terraform) lets developers define infrastructure using TypeScript, Python, Java, C#, or Go instead of HCL. It synthesizes familiar programming language constructs into standard Terraform JSON configuration. Developed by HashiCorp, it brings software engineering patterns like loops, conditionals, and abstractions to infrastructure definition with full IDE support.

Is CDKTF free?

Yes — CDKTF is open source and free to use. 100% free and open source under the Mozilla Public License 2.0 (MPL-2.0) with $0 software licensing fees. CDKTF enables defining Terraform infrastructure in TypeScript, Python, Go, C#, and Java. (Note: HashiCorp officially deprecated and archived the CDKTF repository in December 2025 in favor of standard HCL and HCP Terraform workflows, though the codebase remains open source and functional for existing syntheses). Executing synthesized Terraform JSON configurations incurs standard cloud infrastructure fees and optional HCP Terraform / Terraform Cloud tier costs if utilized for remote state execution.

Is CDKTF open source?

Yes — CDKTF is open source.

Is CDKTF still maintained?

Yes — CDKTF is active. Its listing was last verified on September 6, 2026.

What are the best CDKTF alternatives?

The first editor-selected CDKTF alternatives are Gruntwork, env0.