Skip to main content
Infrastructure as Code Tools in 2026: The Best IaC Tools Compared

Infrastructure as Code Tools in 2026: The Best IaC Tools Compared

KU
· Founder & Chief Editor
• 8 min read•Updated •

Terraform, OpenTofu, Pulumi, CDK, CloudFormation, Crossplane, and Ansible each solve a different slice of the IaC problem. This is how they compare on license, language, state, and cost.

Key takeaways

  • The most popular infrastructure as code tools in 2026 are Terraform and its open-source fork OpenTofu for multi-cloud HCL, Pulumi for real programming languages, AWS CDK and CloudFormation for AWS-only shops, and Crossplane for Kubernetes control planes.
  • Ansible configures servers rather than provisioning clouds.
  • For a new project we default to OpenTofu.

The best infrastructure as code tools in 2026 are Terraform and OpenTofu (declarative HCL, the largest provider ecosystem), Pulumi (TypeScript, Python, Go), AWS CDK and CloudFormation (AWS only), and Crossplane (Kubernetes-native). Ansible is configuration management, not provisioning. For a new multi-cloud project, OpenTofu is our default.

Verified against

Terraform 1.17, OpenTofu 1.13, Pulumi 3.273, AWS CDK 2.275, Crossplane 2.4, against each project's GitHub releases, the OpenTofu S3 backend docs, and the HashiCorp, Pulumi, AWS and Spacelift pricing pages. Checked October 2026.

Every option here can create a VPC and a database. What separates them is the license you accept, the language your team writes, and where state lives.

The IaC tools, side by side

Prices from vendor pricing pages, as of October 2026.

ToolBest forLicensePricing modelKey limit
Terraform 1.17Biggest ecosystem and vendor supportBUSL 1.1 (source-available)CLI free; HCP Terraform free to 500 managed resources, then per resourceNot open source; competing hosted offerings restricted
OpenTofu 1.13Terraform without the license questionMPL 2.0FreeNo equivalent for some HCP-only features
PulumiLoops, functions, and unit tests in a real languageApache 2.0Pulumi Cloud Free for 1 user; Essentials $40/month with up to 500 resourcesFewer examples than HCL
AWS CDKAWS-only teams writing TypeScript or PythonApache 2.0Free; synthesizes to CloudFormationAWS only; inherits CloudFormation limits
CloudFormationAWS-native stacks with managed rollbackProprietary AWS serviceNo charge for AWS::* resources; third-party handlers $0.0009 per operationAWS only; verbose YAML or JSON
CrossplaneSelf-service platform APIs on KubernetesApache 2.0, CNCF graduatedFreeNeeds a cluster and controller expertise
AnsibleConfiguring servers, ordered tasksOpen sourceFree; Red Hat sells Ansible Automation PlatformWeak at tracking cloud resource state

The Terraform family: Terraform and OpenTofu

Terraform is still the center of gravity: the provider registry covers every major cloud and most SaaS APIs. HashiCorp moved it to the Business Source License 1.1 in 2023; the latest release is 1.17.1 as of October 2026. For teams managing their own infrastructure, the BUSL changes little day to day.

OpenTofu is the community fork, licensed MPL 2.0, at 1.13.2 as of October 2026. OpenTofu's migration guide boils down to: back up state and code, install OpenTofu, initialize and verify, then test with a small change. In practice:

Terminal
terraform state pull > backup.tfstate   # step 1: keep a copy you control
tofu init                               # reads the same .tf files and lock file
tofu plan -detailed-exitcode            # exit 0: no changes, exit 2: diff to review
echo $?
0

An exit code of 2 after the swap means something differs; read the plan before you apply anything. Configurations that read each other through terraform_remote_state need extra care, per the guide.

Whichever binary you run, put state in a locked remote backend on day one. With S3, native lockfile locking means you no longer need a DynamoDB table:

infra/backend.tf
terraform {
  backend "s3" {
    bucket       = "acme-tofu-state"
    key          = "prod/network.tfstate"
    region       = "us-east-1"
    encrypt      = true
    use_lockfile = true
  }
}

Where they win: provider breadth, mature modules, and HCL examples for nearly everything. Where they don't: HCL gets awkward with deep conditional logic, and state is a file you must lock, back up, and protect. The detailed path is in Terraform vs OpenTofu.

Real programming languages: Pulumi and AWS CDK

Pulumi lets you write infrastructure in TypeScript, Python, Go, C#, or Java. The engine is Apache 2.0; Pulumi Cloud is the paid state and collaboration backend, with Essentials at $40 a month for up to 500 managed resources and $0.1825 per resource-month beyond, as of October 2026. You can also keep state in your own bucket for free.

AWS CDK compiles to CloudFormation templates, so AWS handles state, rollback, and drift detection and you never run a state backend. The cost is being bound to AWS and to CloudFormation's deployment speed. We compare the two in Pulumi vs AWS CDK.

Where they win: application developers who want to test infrastructure with the tools they already use. Where they don't: real languages make it easy to write clever infrastructure only its author can review.

AWS-native and Kubernetes-native: CloudFormation and Crossplane

CloudFormation is the only tool here with server-side state and automatic rollback built in. AWS::* resource types carry no extra charge. Third-party resource types and hooks cost $0.0009 per handler operation, plus $0.00008 per second beyond 30 seconds per operation, as of October 2026.

Crossplane turns cloud resources into Kubernetes custom resources that controllers reconcile continuously, so drift gets corrected rather than reported. It graduated in the CNCF on October 28, 2025. It earns its complexity when a platform team exposes a "database" API to developers through kubectl or Argo CD; Crossplane vs Terraform covers when that trade pays.

Ansible is not a Terraform replacement

Ansible connects over SSH and runs ordered tasks such as installing packages and templating config files. It can call cloud APIs, but it keeps no state file, so it cannot reliably tell you what it created last month or delete what it no longer manages. The common pattern is OpenTofu or Terraform to provision, Ansible to configure what runs inside. The full split is in Ansible vs Terraform.

The automation layer: where IaC runs

Once more than two people apply changes, the workflow matters more than the tool: remote state, locking, plan review on pull requests, policy checks, drift detection. As of October 2026:

  • HCP Terraform: the enhanced Free tier covers 500 managed resources with unlimited users (the legacy free plan ended March 31, 2026). Essentials starts at $0.10 per resource per month.
  • Spacelift: Free for 2 users; Starter from $399 a month with 10 users and 2 public workers.
  • Atlantis: open source and self-hosted; runs plan and apply from pull request comments.

Atlantis is the cheapest serious option for a small team; past a few thousand resources, compare the Terraform Cloud alternatives.

The errors that actually stop you

Error: Error acquiring the state lock. Another run holds the lock, or a crashed run left it. Confirm nothing is applying, then tofu force-unlock <LOCK_ID> with the ID from the message.

Error: Inconsistent dependency lock file. .terraform.lock.hcl does not match the providers in your code. Run tofu init -upgrade and commit the updated lock file.

Error: Backend configuration changed. You edited the backend block. Run init -migrate-state to move state, or init -reconfigure if the new backend already holds it.

UPDATE_ROLLBACK_FAILED in CloudFormation or CDK. A resource could not roll back. Fix the cause, then aws cloudformation continue-update-rollback --stack-name <name>.

Where this breaks

These defaults assume a team that owns its own infrastructure. If you resell hosted Terraform, read the BUSL before anything else. If you are all-in on one cloud with a small team, CDK or CloudFormation removes state management entirely, and that can beat OpenTofu's portability. Prices and free tiers here change often; recheck before you budget.

Questions people ask

Terraform is the most widely used, followed by its fork OpenTofu, Pulumi, AWS CloudFormation with AWS CDK, and Crossplane on Kubernetes. Ansible is popular too, but it is a configuration management tool rather than a provisioning tool. Most job postings that mention IaC mean Terraform-style HCL, which is why it is the safest skill to learn first.

Is Terraform still free to use?

The Terraform CLI is free under the Business Source License 1.1 for running your own infrastructure. It is source-available rather than open source, and the license restricts products that compete with HashiCorp. HCP Terraform is free up to 500 managed resources with unlimited users as of October 2026, then billed per resource from $0.10 a month.

Should I learn Terraform or Pulumi first?

Learn Terraform or OpenTofu first. HCL is the most common syntax in job descriptions, docs, and modules, and the concepts of providers, state, and plans transfer directly to Pulumi. Move to Pulumi when your team wants unit-tested infrastructure in a language it already writes daily and reviewers can keep up.

The decision, concretely

  • New multi-cloud project, no strong language preference? OpenTofu, with state in an encrypted, locked bucket.
  • Already on Terraform with HCP features you depend on? Stay; the license rarely affects end users.
  • Application developers own the infrastructure? Pulumi, or AWS CDK if everything is on AWS.
  • Internal platform on Kubernetes? Crossplane, behind a GitOps controller.

The call we'd make

Default to OpenTofu for a new project: you keep the HCL ecosystem and remove the license question for good. Pick Pulumi only when your team will actually test its infrastructure code. Put remote state, locking, and pull request plans in place before the third engineer joins, with Atlantis if budget is tight. Most IaC pain comes from undisciplined state, not from the wrong tool.

Sources

Explore topics:TerraformDevOps
React
Share this post
Cite this article
Plain text

Kiril Urbonas (2026). Infrastructure as Code Tools in 2026: The Best IaC Tools Compared. DevOpsNess. Updated 2026-11-15. https://www.devopsness.com/blog/best-iac-tools

Markdown

[Infrastructure as Code Tools in 2026: The Best IaC Tools Compared](https://www.devopsness.com/blog/best-iac-tools) (Kiril Urbonas, DevOpsNess, updated 2026-11-15)

KU

Kiril Urbonas

Founder & Chief Editor

610 articles
View all articles by Kiril Urbonas

You might have missed

Evergreen posts worth revisiting.