Cloud Development Kit for Terraform, commonly referred to as CDKTF, represented a significant pivot in the infrastructure-as-code landscape by allowing developers to define and provision infrastructure using familiar programming languages rather than HashiCorp Configuration Language (HCL). The core value proposition of CDKTF was the elimination of the learning curve associated with HCL, granting teams access to the entire Terraform ecosystem while leveraging their existing toolchains for testing, dependency management, and software engineering practices. Although HashiCorp, an IBM Company, officially sunset and archived the project on December 10, 2025, the architectural patterns, coding paradigms, and migration strategies defined by CDKTF remain critical for organizations maintaining legacy codebases or understanding the evolution of infrastructure automation. This article provides a comprehensive technical analysis of CDKTF’s architecture, supported languages, operational workflow, and the mandatory migration path required post-deprecation.
Historical Context and Product Lifecycle
The introduction of CDKTF was driven by the recognition that Terraform’s HCL, while effective for simple configurations, became cumbersome for complex infrastructure patterns. HCL is a domain-specific language, and while it excels at declarative resource definition, it lacks the expressive power of general-purpose programming languages for implementing logic, loops, and complex abstractions. CDKTF addressed this by enabling infrastructure definition in TypeScript, Python, Java, C#, and experimental Go. This approach allowed teams to apply standard software engineering habits, such as unit testing for infrastructure logic and the creation of reusable components with proper interfaces.
However, the lifecycle of the project concluded with a formal sunset announcement. Terraform CDK was scheduled to be archived on December 10, 2025. HashiCorp, an IBM Company, stated that it would no longer maintain or develop the project after this date. The decision was attributed to the project not finding product-market fit at scale. Consequently, HashiCorp, an IBM Company, chose to focus its investments on Terraform core and its broader ecosystem.
As of December 10, 2025, the Terraform CDK repository on GitHub was archived and made read-only. The documentation was updated to reflect its deprecated status. No further updates, security fixes, or compatibility improvements are being made to the codebase. The project remains licensed under the Mozilla Public License (MPL), and HashiCorp, an IBM Company, does not apply any additional restrictions. While the original maintainers have ceased development, the community is encouraged to fork the project if there is interest in continuing independent maintenance. For existing users, the project is available to use at their own risk, with the caveat that no official support or bug fixes will be provided.
| Feature | Status Pre-December 2025 | Status Post-December 2025 |
|---|---|---|
| GitHub Repository | Active Development | Archived (Read-Only) |
| Maintenance | Active by HashiCorp | Ceased |
| Bug Fixes | Available | Unavailable |
| Compatibility Updates | Available | Unavailable |
| License | Mozilla Public License (MPL) | Mozilla Public License (MPL) |
| Official Support | Provided | Withdrawn |
Supported Languages and Toolchain Integration
CDKTF’s primary advantage was its polyglot support, allowing teams to choose a language that aligned with their existing organizational tooling. The framework supported TypeScript, Python, Java, C#, and Go. The choice of language was often dictated by the team’s familiarity and the specific ecosystem they operated within. For instance, Python support was particularly useful for teams that already automated cloud platforms with Python scripts, internal tools, or data engineering workflows. TypeScript remained the foundational language for the core libraries due to the underlying tooling used to generate bindings for other languages.
The use of general-purpose languages enabled developers to utilize standard dependency management and testing frameworks. This integration meant that infrastructure code could be treated similarly to application code, benefiting from continuous integration pipelines, code review processes, and type safety. The ability to use loops and conditionals naturally, rather than relying on HCL’s limited logical operators, was a critical feature for complex infrastructure patterns. Developers could create constructs to model reusable infrastructure patterns composed of multiple resources and convenience methods, significantly reducing duplication and improving maintainability.
The choice between using CDKTF or standard HCL was often based on specific project requirements. CDKTF was recommended for scenarios where there was a strong preference or need to use a procedural language to define infrastructure. It was particularly suited for teams needing to create abstractions to manage complexity, such as when modeling a reusable infrastructure pattern composed of multiple resources. However, the project documentation also noted that users should be comfortable living on the cutting edge, as CDKTF may have had breaking changes prior to its hypothetical 1.0 release. The interoperability with existing Terraform providers and modules allowed teams to make this choice on a per-project or per-team basis, rather than requiring an organization-wide shift.
Core Architecture and Components
Understanding the internal mechanics of CDKTF is essential for troubleshooting and migration. CDKTF leveraged concepts and libraries from the AWS Cloud Development Kit (AWS CDK) to translate code into infrastructure configuration files. It is crucial to note that AWS CDK and CDK for Terraform are different products. While they share core concepts, AWS CDK constructs could not be directly used within CDKTF. An interoperability layer was in technical preview and was not ready for production use at the time of the project's sunset.
CDKTF consisted of two major components: the library (Lib) and the Command Line Interface (CLI).
- Lib (The cdktf Package): This package served as the foundation for each CDKTF project. It contained the core libraries that allowed developers to leverage the Terraform ecosystem and synthesize the application into Terraform configuration files. The library was responsible for automatically extracting the schema from Terraform providers and modules to generate the necessary classes for the application.
- CLI (The cdktf Tool): The CLI allowed users to initialize new projects, adjust settings, synthesize infrastructure, and deploy applications. It provided commands such as
cdktf init,cdktf synth,cdktf deploy, andcdktf destroy.
The CDKTF application structure was organized as a tree of constructs. In the context of AWS CDK, constructs are defined as "classes that define a 'piece of system state'". The foundational classes for building a CDKTF application were App, Stack, and Resource. Each CDKTF project contained one or more App instances, which acted as containers for the infrastructure configurations. Within the App, Stack instances defined the specific infrastructure to be provisioned, and Resource instances represented the actual cloud resources.
The translation process relied on the jsii tool. jsii enabled the publishing of polyglot libraries in all supported languages from a single TypeScript code base. CDKTF used TypeScript types to generate an assembly file, which jsii then used to generate code bindings for the other supported languages (Python, Java, C#, Go). This mechanism ensured that the API surface was consistent across languages while allowing developers to work in their preferred environment.
Synthesis and Execution Workflow
The deployment workflow in CDKTF differed from standard Terraform usage in that it required a synthesis step before execution. The process generally followed these steps:
- Create an Application: Users would scaffold a project using a built-in or custom template in their chosen language.
- Define Infrastructure: Developers used their chosen language to define the infrastructure they wanted to provision on one or more providers.
- Synthesize: The
cdktf synthcommand was executed to convert the code into a Terraform-compatible JSON configuration file. This JSON file represented the desired state of the infrastructure in a format that Terraform could understand. - Deploy: The infrastructure was provisioned using CDKTF CLI commands, such as
cdktf deploy, or by using the synthesized JSON file with standard Terraform CLI commands.
All CDKTF CLI operations, including diff, deploy, and destroy, communicated with Terraform for execution. This meant that the underlying engine performing the infrastructure changes was still Terraform, ensuring compatibility with the Terraform state and provider ecosystem. Users could use every Terraform provider and module available on the Terraform Registry. Furthermore, CDKTF could be used in conjunction with HCP Terraform, Terraform Enterprise, and HashiCorp's policy-as-code framework, Sentinel.
| Component | Role in CDKTF Workflow |
|---|---|
| Source Code | Written in TypeScript, Python, Java, C#, or Go. |
| jsii | Generates language bindings from TypeScript assembly. |
| cdktf synth | Converts code to Terraform JSON configuration. |
| Terraform Engine | Executes the plan and apply operations. |
| Terraform State | Tracks the actual state of deployed resources. |
The output of the synthesis process was a JSON file located in a designated output folder. This file could be used directly by Terraform, or the CDKTF CLI could manage the entire lifecycle. The CLI provided a higher-level abstraction, handling the synthesis and the subsequent Terraform operations in a single command. This streamlined the workflow for developers who wished to abstract away the specifics of Terraform’s configuration format.
Migration Strategy and Deprecation Handling
With the official deprecation of CDKTF on December 10, 2025, organizations with existing CDKTF codebases face the immediate challenge of migration. The recommended path for migration involves generating standard HCL configuration files directly from the CDKTF project. This approach allows teams to transition to standard Terraform workflows without rewriting their entire infrastructure definitions from scratch.
The primary command for this migration is:
bash
cdktf synth --hcl
This command produces readable HCL configuration files, which are significantly easier to maintain and manage than the JSON output generated during the standard synthesis process. The --hcl flag instructs the CDKTF CLI to output the synthesized configuration in HCL syntax rather than JSON. Once the HCL files are generated, teams can use standard Terraform CLI commands to continue managing their infrastructure.
The migration workflow typically involves the following steps:
- Synthesize to HCL: Run
cdktf synth --hclto generate.tffiles. - Review and Refactor: Inspect the generated HCL files to ensure they meet organizational standards and best practices.
- Initialize Terraform: Use
terraform initto download providers and initialize the state. - Plan and Apply: Use
terraform planto review changes andterraform applyto provision or update the infrastructure.
This method leverages the existing CDKTF code to produce a compatible output, effectively decoupling the infrastructure definition from the deprecated CDKTF tooling. Teams can then manage the HCL files using standard version control, CI/CD pipelines, and Terraform best practices. It is important to note that while the code is read-only and no longer supported, the generated HCL files are fully compatible with the current version of Terraform.
| Command | Purpose |
|---|---|
cdktf synth --hcl |
Generates HCL configuration files from CDKTF code. |
terraform init |
Initializes the Terraform working directory. |
terraform plan |
Creates a plan for infrastructure changes. |
terraform apply |
Applies the changes to the infrastructure. |
For teams that relied heavily on CDKTF constructs and abstractions, the migration to HCL may require significant refactoring. HCL lacks the native class and object support found in general-purpose languages. However, Terraform modules can be used to recreate reusable abstractions. Teams should assess their specific use cases to determine the most efficient migration path. Some may choose to rewrite the abstractions in HCL, while others may explore community forks of CDKTF if they require continued use of programming languages for infrastructure definition.
Implications for the Terraform Ecosystem
The sunset of CDKTF reflects a broader strategic shift in the Terraform ecosystem. By focusing on Terraform core and its broader ecosystem, HashiCorp, an IBM Company, aims to strengthen the foundational aspects of the product rather than expanding into higher-level abstractions. This decision underscores the stability and maturity of the Terraform provider ecosystem and the HCL language itself. While HCL has limitations in expressive power for complex logic, its consistency and ubiquity in the industry make it a reliable choice for infrastructure-as-code.
The deprecation also highlights the importance of planning for tooling lifecycle. Teams that adopted CDKTF early benefited from its advanced features but must now navigate the transition to standard Terraform or alternative solutions. The availability of community forks provides a potential avenue for those who wish to continue using CDKTF-style abstractions, but without official support, these forks may lack the security and compatibility guarantees of the original project.
Organizations should prioritize the migration of their infrastructure to standard Terraform HCL to ensure long-term stability and support. The cdktf synth --hcl command provides a viable path for this transition, allowing teams to retain their existing infrastructure definitions while adopting a more sustainable tooling stack. By leveraging the generated HCL files, teams can integrate their infrastructure management into standard Terraform workflows, ensuring compatibility with the latest features and security updates from HashiCorp, an IBM Company.
Conclusion
Terraform CDKTF served as a significant experiment in the intersection of software engineering and infrastructure management. By allowing developers to use general-purpose programming languages to define infrastructure, it offered powerful abstractions and integration with existing toolchains. However, the project’s deprecation on December 10, 2025, marks the end of its official life. The strategic decision by HashiCorp, an IBM Company, to focus on Terraform core reflects a prioritization of stability and broad ecosystem support over experimental features.
For technical leaders and engineers, the primary concern is the migration of existing CDKTF codebases. The recommended approach is to utilize the cdktf synth --hcl command to generate standard HCL configuration files, which can then be managed using standard Terraform CLI commands. This migration path ensures continuity of infrastructure management while transitioning away from deprecated tooling. Teams must also consider the long-term implications of this change, including the need to refactor complex abstractions into Terraform modules or evaluate community-maintained forks. The legacy of CDKTF will persist in the patterns and practices it introduced, but the operational reality requires a shift toward the standard Terraform ecosystem for future-proofing infrastructure deployments.