Choosing an Infrastructure-as-Code Tool: Terraform, OpenTofu, Pulumi or AWS CDK
Picking an infrastructure-as-code tool used to be a one-word answer. Then HashiCorp changed Terraform's licence, the community forked it, IBM bought HashiCorp, and HashiCorp archived its own CDK for Terraform. If you're starting a new project, or your security team has started asking about licences, the question is open again.
This guide covers the four realistic options, Terraform, OpenTofu, Pulumi and the AWS CDK. It focuses on what decides it in practice: what language you write, where state lives, what the licence lets you do, and what a managed backend costs. Versions and prices are as of November 2026, from the projects' own pages.
Three models, not four tools
The first split isn't vendor, it's how your code becomes API calls and who keeps track of what exists.
- Terraform and OpenTofu read declarative HCL, compute a plan, and call cloud APIs through provider plugins. State is a file in a backend you choose (S3, a database, HCP Terraform and so on), and you're responsible for locking and protecting it.
- Pulumi runs a real program in TypeScript, Python, Go, .NET, Java or YAML (all listed as stable in the Pulumi repo). Its engine diffs the desired resources against state and calls providers. State goes to Pulumi Cloud by default or a backend you manage.
- AWS CDK also runs a real program, in TypeScript, JavaScript, Python, Java, C# or Go, but it doesn't call AWS APIs itself. Per AWS's guide,
cdk synthproduces a CloudFormation template and the CloudFormation service does the deploying, with rollback on error. There's no state file for you to look after; CloudFormation holds it.
The same S3 bucket in each looks like this:
# Terraform or OpenTofu
resource "aws_s3_bucket" "logs" {
bucket = "acme-app-logs"
}
// Pulumi (TypeScript)
import * as aws from "@pulumi/aws";
const logs = new aws.s3.Bucket("logs");
// AWS CDK (TypeScript), inside a Stack constructor
import * as s3 from "aws-cdk-lib/aws-s3";
new s3.Bucket(this, "Logs");
The HCL is shorter for one bucket. The programs win once you need loops over environments, shared functions, or unit tests in your normal test runner. The CDK example hides the most: AWS's own guide shows a dozen lines of CDK producing a CloudFormation template of more than 500 lines with over 50 resources. That's either a superpower or a debugging problem depending on the day.
Terraform: the default, now under IBM
Terraform's latest release is v1.17.1, from 28 October 2026. Since 1.6.0 it's been under the Business Source License 1.1, with IBM now named as licensor. The licence allows production use, including internal use across your company, but not offering Terraform to third parties on a hosted or embedded basis in a paid product that competes with IBM's. Each release converts to MPL 2.0 four years after it's published.
For most companies that restriction never applies. It matters if you build a platform, an internal-developer-portal product, or a managed service that runs Terraform for customers. Ask a lawyer, not a blog post.
IBM's acquisition of HashiCorp closed on 27 February 2025. HCP Terraform, the managed service, is priced per managed resource: the pricing page lists Essentials from $0.10 per resource per month, Standard from $0.47 and Premium from $0.99, billed hourly. The HCP Terraform docs say free organisations are limited to 500 managed resources.
One more change: CDK for Terraform (CDKTF) was archived on 10 December 2025. HashiCorp recommends moving to plain HCL and offers cdktf synth --hcl to generate HCL from an existing project. If you were planning to write Terraform in TypeScript, that route is closed; Pulumi is the closest replacement.
OpenTofu: Terraform's open fork
OpenTofu is the community fork created after the licence change, run under the Linux Foundation and licensed MPL-2.0. It describes itself as a drop-in replacement for Terraform. The current series is 1.13; v1.13.9 shipped on 5 November, with 1.12 still getting patch releases.
It isn't standing still as a clone. Features Terraform doesn't have include client-side state encryption, available since 1.7, with key providers such as PBKDF2, AWS KMS, GCP KMS and OpenBao. The 1.13 release notes add planning functions for module authors, an early linting experiment, and official Windows on ARM64 builds. They also drop WinRM for provisioners and require macOS 13 or later, and 1.13 is the last series with official 32-bit builds.
Switching an existing project is mostly swapping the binary:
tofu init # re-initialises providers and the backend
tofu plan # should show no changes if the state matches
The "mostly" is real. As the two projects add features independently, configurations that use something only one side has won't move cleanly. Pin your version, run a plan against every workspace, and read the migration notes for the Terraform version you're coming from.
Pulumi: real languages, Apache 2.0
The Pulumi CLI, SDKs and engine are Apache 2.0, so there's no licence question for the tool itself. You can run it against a self-managed state backend and never pay anyone.
Pulumi Cloud pricing as of November 2026: Free for one user; Essentials at $40 a month, which includes 40 credits and covers up to 500 managed resources at $0.1825 per resource per month; Pro at $400 a month with 400 credits and up to 2,000 resources, from $0.365 per resource per month. Resources are billed hourly, and a partial hour counts as a full hour.
The reason to pick Pulumi is the language. If your platform team writes TypeScript or Go all day, giving them loops, types, packages and their usual test tools for infrastructure is a real productivity gain. The reason not to: infrastructure code that's "just code" can become clever code, and clever infrastructure is hard to review. Set lint rules and keep abstractions shallow.
Our Terraform vs Pulumi comparison goes deeper on these two.
AWS CDK: if you're all-in on AWS
The aws-cdk repo is Apache 2.0, and the CDK is free; you pay for the AWS resources it creates. Because it deploys through CloudFormation, you inherit CloudFormation's behaviour: managed state, automatic rollback on failure, and whatever resource coverage and limits CloudFormation has. You also get high-level constructs that set sensible defaults for you, which is the main reason people pick it.
The obvious limit is that it's AWS only. If there's any chance you'll manage resources outside AWS (DNS at Cloudflare, a database at another provider, GitHub repos), you'll end up running a second tool next to it.
Gotchas whichever you choose
- State is the crown jewels. Terraform and OpenTofu state can contain secrets in plain text. Encrypt the backend, restrict who can read it, and turn on locking. OpenTofu's state encryption helps; it doesn't replace access control.
- Price per resource adds up. Both HCP Terraform and Pulumi Cloud bill per managed resource. A Kubernetes cluster with many small objects, or a CDK-style construct that expands into dozens of resources, can cost more than you expect. Count before you migrate.
- Don't let agents apply without review. AI coding assistants write IaC readily now, and there are MCP servers such as the Terraform MCP server and the AWS MCP server. Keep
applybehind a human-reviewed plan. Our posts on MCP servers for cloud infrastructure and for DevOps and CI cover scoping those credentials. - Pin everything. Pin the CLI version, the provider versions and the module versions. Upgrades should be a pull request with a plan attached, not something that happens because a CI image moved.
The decision rule
- If you already run Terraform and the BSL doesn't affect your business, stay on Terraform; there's no urgent reason to move.
- If you want an open-source licence, or you're building something that hosts IaC for others, use OpenTofu. It's the lowest-effort exit from Terraform, and its state encryption is a genuine extra.
- If your team would rather write TypeScript, Python or Go than HCL, or you were relying on CDKTF, pick Pulumi.
- If everything you run is on AWS and you're happy with CloudFormation managing state and rollback, use the AWS CDK.
- For a new multi-cloud project with no constraints, I'd start with OpenTofu: same HCL and provider ecosystem as Terraform, with an open licence and no lock-in to one vendor's managed backend.
Written by AIDToolStack Editorial
Researched from official documentation, specifications and vendor pages, listed under Sources below. Last checked November 2026.
Sources
- github.com/pulumi/pulumi
- docs.aws.amazon.com/cdk/v2/guide/home.html
- github.com/hashicorp/terraform/releases
- github.com/hashicorp/terraform/blob/main/LICENSE
- www.hashicorp.com/en/blog/hashicorp-officially-joins-the-ibm-family
- www.hashicorp.com/en/pricing
- developer.hashicorp.com/terraform/cloud-docs/overview
- github.com/hashicorp/terraform-cdk
- opentofu.org/
- github.com/opentofu/opentofu
- github.com/opentofu/opentofu/releases
- www.pulumi.com/pricing/
- github.com/aws/aws-cdk
Related Posts
Explore on AIDToolStack
Discover tools and servers featured in our directory.
AI Tools
MCP Servers
Sponsor Our Newsletter
Reach thousands of developers who are actively evaluating AI tools, MCP servers, and dev infrastructure. Our weekly newsletter goes to engaged technical decision-makers.
All sponsored content is clearly labeled per our editorial policy.