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.