HashiCorp Deprecates CDKTF, Leaving IaC Developers Seeking Alternatives
Share this article
In a move that has sent ripples through the infrastructure-as-code (IaC) community, HashiCorp (owned by IBM) has deprecated the Cloud Development Kit for Terraform (CDKTF). The decision, announced on GitHub, comes just days after developer Michael Lohr published an article extolling CDKTF's virtues on Golem.de, leaving him and many others in a lurch.
"Great… not only did I just write an article about it, but I also use CDKTF everywhere," Lohr wrote in a follow-up blog post.
CDKTF allowed developers to define cloud infrastructure using familiar programming languages like TypeScript, Python, Java, and C#, generating Terraform HCL under the hood. This approach promised the robustness of Terraform's ecosystem combined with the flexibility and expressiveness of modern programming paradigms — enabling reusable constructs, complex logic, and enhanced developer experience.
Why CDKTF Resonated
Terraform's declarative HashiCorp Configuration Language (HCL) is powerful but becomes cumbersome for complex, large-scale infrastructure. CDKTF addressed this by letting developers leverage software engineering principles:
import { Construct } from "constructs";
import { s3 } from "@cdktf/provider-aws";
export class StandardBucket extends Construct {
constructor(scope: Construct, id: string, props: { name: string }) {
super(scope, id);
new s3.S3Bucket(this, "bucket", {
bucket: props.name,
// ... encryption and lifecycle rules defined here
});
}
}
Example: A reusable CDKTF Construct encapsulating a standardized S3 bucket configuration.
Unlike AWS CDK, which locks users into AWS, CDKTF maintained Terraform's provider-agnostic strength. Developers could manage resources across AWS, Azure, GCP, Kubernetes, and more within a single, coherent codebase using Terraform's vast provider ecosystem.
The Mechanics and the Limits
CDKTF operated by building an in-memory Construct tree representing the infrastructure. During synthesis (cdktf synth), it converted this tree into Terraform JSON or HCL. While powerful, it inherited Terraform's constraints:
- State & Refactoring Woes: Terraform's state management complexities and refactoring pains remained.
- Tokenization: Developers worked with placeholders (
TF_TOKEN[xyz]), not real values, requiring understanding of Terraform's interpolation. - Escape Hatches: Necessary for edge cases not covered by provider bindings, these underscored the underlying Terraform layer.
- Maturity: Documentation gaps and experimental features presented learning curves.
Pulumi: The Direct Challenger
Pulumi emerged as the primary alternative, offering similar multi-language support (TypeScript, Python, Go, C#, Java) but bypassing Terraform generation. Its engine interacts directly with cloud providers or uses the Terraform Bridge for Terraform provider compatibility. This architecture offers potential agility but replaces Terraform's established toolchain with Pulumi's own ecosystem.
An Uncertain Future
HashiCorp stated the deprecation aims to focus resources on enhancing Terraform to compete with OpenTofu, the community fork born from HashiCorp's controversial license change. While the Open Construct Foundation explores "community-driven stewardship," OpenTofu maintainers have declined to adopt CDKTF.
For developers like Lohr, CDKTF represented a significant evolution in IaC — merging software engineering rigor with Terraform's reliability. Its deprecation highlights the volatility in the IaC tooling landscape. Teams heavily invested in CDKTF now face migration challenges, while the broader community ponders the long-term viability of vendor-controlled open core models. The quest for the ideal blend of programmability and ecosystem stability continues, now with one less contender on the field.
Source: Hashicorp killed my favorite IaC Tool by Michael Lohr