HashiCorp archived CDK for Terraform on December 10, 2025. Six places to take a CDKTF codebase, ranked, with the migration step for each and what you keep or give up.

The best CDKTF alternative depends on what your stacks describe. If they mostly hold one backend's databases, queues, buckets and secrets, Encore replaces that code: the application declares those resources and Encore provisions them in your own AWS or GCP account. To keep the CDKTF code itself running, CDK Terrain, the community fork, is a package rename. Pulumi keeps infrastructure in a general-purpose language, and Terraform HCL is HashiCorp's own recommendation.
HashiCorp archived CDK for Terraform on December 10, 2025, and the sunset notice says it gets no further fixes, including compatibility updates. Existing projects keep working, but every Terraform and provider release from now on is untested against it.
Verdict: pick Encore when the CDKTF stacks exist to serve a backend, CDK Terrain when you need the existing code to keep working this quarter with the least change, and Terraform HCL or Pulumi when the stacks manage shared cloud foundations.
Encore brings infrastructure from code: instead of a second program that describes the database, topic and secret a service uses, the service declares them, and Encore provisions RDS, SNS and SQS, S3 and Secrets Manager on AWS, or Cloud SQL, Pub/Sub, Cloud Storage and Secret Manager on GCP, in your own account. There is no synth step, no state file to store and no stack to keep in step with the code.
A CDKTF stack for a signup flow usually held a database, a topic with a queue, a secret and the policies that tied them to a service. In Encore that is the service:
// signups/signups.ts
import { api } from "encore.dev/api";
import { secret } from "encore.dev/config";
import { Topic } from "encore.dev/pubsub";
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("signups", { migrations: "./migrations" });
// Secrets Manager on AWS, Secret Manager on GCP. Set with: encore secret set --type prod CrmApiKey
const crmApiKey = secret("CrmApiKey");
export const signedUp = new Topic<{ email: string }>("signed-up", {
deliveryGuarantee: "at-least-once",
});
export const signup = api(
{ expose: true, method: "POST", path: "/signups" },
async ({ email }: { email: string }): Promise<{ ok: boolean }> => {
await db.exec`INSERT INTO signups (email) VALUES (${email}) ON CONFLICT (email) DO NOTHING`;
await signedUp.publish({ email });
return { ok: true };
},
);
// Called by a subscriber elsewhere in the app. The key never appears in config files.
export function crmHeaders(): Record<string, string> {
return { Authorization: `Bearer ${crmApiKey()}` };
}
The migration in signups/migrations creates the table the query uses:
-- signups/migrations/1_create_signups.up.sql
CREATE TABLE signups (
email TEXT PRIMARY KEY
);
Run in your terminal to get started locally.
encore run starts Postgres and Pub/Sub locally from the same declarations, which a CDKTF setup never gave you. A deploy runs the migrations and updates the infrastructure with the release, in place of a separate cdktf deploy.
That is also why the move suits AI coding agents. An agent adding a queue declares it next to the code that publishes to it and tests it locally, instead of editing a construct tree in a second project and waiting for a plan.
encore run. The same declaration is used in every cloud environment.Encore covers application infrastructure, not your whole cloud estate, so account setup, DNS outside the app and third-party providers such as GitHub or Datadog stay in a general tool, and existing RDS databases can be connected instead of recreated. The Terraform migration guide describes how to move one service at a time.
Yes, if the goal is to keep the code you have. CDK Terrain is the community continuation of CDKTF under the Open Construct Foundation, created with HashiCorp's blessing, licensed MPL-2.0 and compatible with both Terraform and OpenTofu. Its first community release, v0.22.0, shipped in February 2026, and it rebuilds the pre-built provider bindings that CDKTF stopped publishing.
The migration is a rename of packages, imports and CLI commands:
cdktf.json, the cdktf.out/ directory and the logical IDs stay the same, so the state and resource addresses do not change, and cdktn diff should report no changes. The risk is the project's age: the maintainer group is still forming, and you are betting on a community keeping pace with Terraform and provider releases.
For teams that want an actively developed tool with the same programming model, yes. Pulumi programs are written in TypeScript, Python, Go, C#, Java or YAML, with loops, functions and packages, and many Pulumi providers are bridged from Terraform providers, so resource names and arguments look familiar. pulumi convert --from terraform turns HCL into a Pulumi program as a starting point, which pairs with cdktf synth --hcl.
The migration takes effort: constructs do not map one to one, existing resources have to be imported into Pulumi state, and you take on a new state backend. In return you get the language model you chose CDKTF for, on a tool that shipped six releases between October 28 and November 18, 2026, per the Pulumi releases page.
It is HashiCorp's recommendation, and the sunset notice documents the path. cdktf synth --hcl writes readable .tf files from the project, and standard terraform init, plan and apply keep managing the same state:
A plan with no changes means the conversion matches production. You keep every provider and module, and you give up types, classes and the package ecosystem, since HCL only has for_each, modules and functions. The generated files also need a cleanup pass before they read like code a person wrote.
OpenTofu makes more sense when the license matters. It is the MPL-2.0 fork of Terraform, created after HashiCorp moved Terraform to the Business Source License, and it reads the same HCL, providers and state. For a CDKTF team it is the same cdktf synth --hcl migration with tofu at the end, plus OpenTofu features such as client-side state encryption.
When the CDKTF project was almost entirely AWS provider code, or already sat next to AWS CDK. HashiCorp's notice suggests this path for projects tightly integrated with AWS CDK. AWS CDK shares CDKTF's construct model, and its L2 constructs bring defaults and grant methods for IAM, but it synthesizes CloudFormation, so deploys, rollbacks and the 500-resource stack limit come from CloudFormation. Any GitHub, Datadog or Cloudflare providers you used have no equivalent.
Do your CDKTF stacks mostly hold one backend's databases, queues, buckets and secrets?
Do you need the existing CDKTF code to keep working with the smallest change?
Do you want infrastructure in a general-purpose language on an actively developed tool?
Does the license of the Terraform binary matter to you?
Is the project almost entirely AWS?
Yes. HashiCorp sunset CDK for Terraform (CDKTF) and archived the hashicorp/terraform-cdk repository on December 10, 2025. The code stays available read-only, but it gets no fixes, improvements or compatibility updates, and HashiCorp recommends moving to standard Terraform and HCL.
For stacks that mostly hold one backend's databases, queues, buckets and secrets, Encore, which declares those resources in the application code and provisions them in your own AWS or GCP account with no separate infrastructure program. To keep the CDKTF code running with minimal changes, CDK Terrain, the community fork, is a rename of packages and imports. Pulumi fits teams that want infrastructure in a general-purpose language across many providers, and Terraform HCL is HashiCorp's own recommendation.
CDK Terrain is the community-governed continuation of CDKTF under the Open Construct Foundation, licensed MPL-2.0. It keeps the CDKTF codebase and history, works with Terraform and OpenTofu, and migrating is mostly renaming cdktf to cdktn in packages, imports and CLI commands. Version 0.25.1 was released on November 19, 2026.
Run cdktf synth --hcl to generate Terraform configuration files from the project, review them, and keep managing the same state with terraform plan and terraform apply. Move one stack at a time, and keep the rest on CDKTF or CDK Terrain until each stack is converted.
Yes. Existing projects keep synthesizing and deploying, but new Terraform and provider releases are no longer tested against it, so you run them at your own risk, and each upgrade gets riskier the longer the code stays on CDKTF.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.