Book a free call

Terraform Competitors Worth Comparing Before You Switch

Terraform is the best-known way to define infrastructure as code, but it is not the only one. Here are six competitors worth comparing.

Hertiv engineering teamReviewed by a senior engineer
7 min read
Terraform Competitors Worth Comparing Before You Switch
On this page

Short answer

Terraform competitors are tools that define, plan and apply cloud infrastructure from code, just as Terraform does. The main options are OpenTofu, Pulumi, AWS CDK, Crossplane, Ansible and CloudFormation, and they differ in language, cloud support and how much of the workflow they run for you. The right choice depends on your team's skills, your cloud, and whether you want a managed service or a tool you run yourself.

Which Terraform competitors are worth comparing?

The competitors worth comparing are the ones that replace Terraform's core job: turning code into real cloud resources, with a plan step that shows what will change before anything is applied. The six below cover the main shapes of that market, from a direct fork to tools that take a different approach entirely.

Use this comparison to shortlist. Prices change and most deals are negotiated, so prices are given as "see vendor site".

Tool Best for Language Cloud support
OpenTofu Terraform users who want an open licence HCL Multi-cloud
Pulumi Teams that prefer code to config TypeScript, Python, Go Multi-cloud
AWS CDK AWS-only teams that write code TypeScript, Python, Java AWS
Crossplane Platform teams on Kubernetes YAML Multi-cloud
Ansible Config plus infrastructure YAML Multi-cloud
CloudFormation AWS-only teams that want native tooling JSON, YAML AWS

Start with two or three rows, not all six. The differences that matter are the language your team already writes, whether you run one cloud or several, and whether you need a managed runner. For managed runners, Terraform Cloud alternatives covers the hosted side of this market.

<h3>1. OpenTofu: best for Terraform users who want an open licence</h3>

OpenTofu is a fork of Terraform, created after HashiCorp changed Terraform's licence. It keeps the same language, HCL, and the same workflow of plan and apply, so a team that already knows Terraform can move its modules with little rewriting. It is developed as an open-source project under a neutral foundation.

The main reason teams choose it is licence certainty: the code stays open source, and no single vendor controls its future. It also keeps the state, provider and module model that Terraform users already know, which makes the move low-risk for existing teams.

Pros:

  • Same language and workflow as Terraform
  • Open-source licence with no vendor lock-in
  • Existing Terraform modules mostly carry over

Cons:

  • Smaller ecosystem than Terraform itself
  • No hosted service from the project itself

<h3>2. Pulumi: best for teams that prefer code to config</h3>

Pulumi lets teams define infrastructure in a general-purpose language such as TypeScript, Python or Go instead of a config language. That means developers can use loops, functions, tests and the same code review habits they use for application code, which suits teams where developers already write code every day.

It stores state, runs previews and applies, and supports the same clouds as Terraform, plus Kubernetes. The trade-off is that the team needs to be comfortable in a programming language, and the mental model is closer to software than to config files.

Pros:

  • Real programming languages with tests and reuse
  • Multi-cloud and Kubernetes support
  • Managed service available for state and runs

Cons:

  • Needs programming skill from the whole team
  • Smaller community than Terraform

<h3>3. AWS CDK: best for AWS-only teams that write code</h3>

AWS CDK is Amazon's framework for defining AWS infrastructure in code. Teams write constructs in TypeScript, Python or Java, and the CDK turns them into CloudFormation templates that AWS then applies. It suits teams that run only on AWS and already write in one of those languages.

Because it is built by AWS, it tracks new AWS services closely, and the construct library covers common patterns such as a queue feeding a function. The limit is clear: it only targets AWS, so a team that also runs another cloud needs a second tool.

Pros:

  • First-class support for new AWS services
  • Reusable constructs for common patterns
  • Free to use, runs on AWS itself

Cons:

  • AWS only, no other cloud
  • Generated templates can be hard to read

<h3>4. Crossplane: best for platform teams on Kubernetes</h3>

Crossplane runs inside Kubernetes and turns cloud resources into Kubernetes objects, so a team manages databases, buckets and networks with the same kubectl commands it uses for applications. It suits platform teams that want developers to request infrastructure through Kubernetes without learning a separate tool.

The model is composition: the platform team defines an abstract resource, such as a database, and developers claim one with a simple YAML file. That gives the platform team control over the defaults while developers get a self-service path.

Pros:

  • Infrastructure as Kubernetes objects
  • Self-service for developers, control for platform teams
  • Multi-cloud providers available

Cons:

  • Needs a Kubernetes cluster to run it
  • Steeper learning curve than plain Terraform

<h3>5. Ansible: best for teams that want config and infrastructure together</h3>

Ansible is best known for configuration management, but it also provisions cloud resources through modules for AWS, Azure and Google Cloud. Teams that already use Ansible to configure servers often use it to create the servers too, keeping one tool and one language for both jobs.

It is not a state-based tool in the way Terraform is: Ansible runs tasks in order and does not keep a record of what it created, so drift detection and safe destroy steps need extra work. That makes it a better fit for smaller estates or for teams that value one tool over strict state tracking.

Pros:

  • One tool for provisioning and configuration
  • Simple YAML playbooks, easy to read
  • Large library of ready-made modules

Cons:

  • No built-in state or drift detection
  • Harder to plan changes before applying them

<h3>6. CloudFormation: best for AWS-only teams that want native tooling</h3>

CloudFormation is AWS's own infrastructure-as-code service, built into the platform. Teams write JSON or YAML templates, and AWS applies them, tracks the stack, and rolls back on failure. It suits teams that run only on AWS and want tooling that is part of the cloud itself, with no separate service to run.

The trade-off is the same as with the CDK: it only covers AWS, and the templates are more verbose than Terraform's. But for an AWS-only team, the native integration, the rollback behaviour and the lack of a separate backend are real advantages.

Pros:

  • Built into AWS, no separate backend to run
  • Automatic rollback on failed changes
  • Deep integration with AWS services

Cons:

  • AWS only, no other cloud
  • Templates are more verbose than HCL

How to choose a Terraform competitor

Choose by the team and the cloud, not by the feature list. A team that writes code daily needs a different tool from a team that writes config, and that difference decides most of the choice.

  1. Count your clouds. If you run more than one cloud, only OpenTofu, Pulumi, Crossplane and Ansible qualify, which narrows the list fast.
  2. Check the language. If your team writes TypeScript or Python daily, Pulumi or the CDK fits; if it writes YAML, OpenTofu or Crossplane fits better.
  3. Decide on state. If you need drift detection and a plan step, pick a state-based tool such as OpenTofu, Pulumi or CloudFormation.
  4. Try one real module. Migrate one non-production module and run a full plan and apply cycle, including a pull request review.
  5. Price the whole year. Count the runner, the state storage and the support, not just the tool licence, and ask for the price at your expected scale.

If you are still deciding how infrastructure should be managed, what infrastructure as code means explains the concepts these tools are built on.

For the open-source-only options, open-source Terraform alternatives covers a different set of tools.

What are the common mistakes?

The most common mistakes when switching are moving everything at once, ignoring state migration, and choosing on price alone.

  • Moving all modules at once. Move one module, prove the workflow, then move the rest. A failed migration on every module at once is hard to roll back.
  • Forgetting state. State holds the record of what exists. Plan how state moves, who can read it, and how it is backed up before the first apply.
  • Choosing on language alone. A nice language does not help if the tool lacks the providers or the drift checks your team relies on.
  • Skipping the trial. A demo rarely shows the hard parts. Run a real module through a full plan and apply cycle before you commit.
  • Ignoring the team. The tool that wins is usually the one the whole team can read and review, not the one the strongest engineer likes most.

For the hosting and operations side of the move, cloud services covers how teams run managed infrastructure in practice.

Key takeaways

  • Terraform competitors replace its core job: code into cloud resources with a plan step
  • OpenTofu is the closest drop-in; Pulumi and the CDK suit teams that write code
  • Crossplane fits platform teams on Kubernetes; Ansible fits config-led teams
  • CloudFormation suits AWS-only teams that want native tooling and rollback
  • Migrate one module first, and price the whole year before you commit

Frequently asked questions

What is the difference between Terraform and OpenTofu?

OpenTofu is a fork of Terraform, created after HashiCorp changed Terraform's licence. It keeps the same language and the same plan-and-apply workflow, so existing Terraform modules mostly carry over. The difference is governance: OpenTofu is developed as an open-source project under a neutral foundation.

Can I use Pulumi with my existing Terraform code?

Pulumi can read Terraform providers and some Terraform modules, so a team can reuse provider coverage while writing new infrastructure in code. A full migration still takes work, because the code and the state model differ. Start with one new module in Pulumi before moving existing ones.

Is AWS CDK the same as CloudFormation?

No. The CDK is a framework that generates CloudFormation templates from code, and CloudFormation is the service that applies them. A team writes CDK code, the CDK turns it into a template, and AWS applies that template. CloudFormation alone means writing the template by hand.

Does Ansible replace Terraform?

It can for small estates, because Ansible provisions cloud resources as well as configuring them. It is not a state-based tool, so it does not track what it created or detect drift the way Terraform does. Teams that need strict state tracking usually keep a state-based tool for provisioning.

Which competitor is best for a multi-cloud team?

OpenTofu and Pulumi are the most direct multi-cloud replacements, because both cover the main clouds with one language and one state model. Crossplane also covers several clouds, but it needs a Kubernetes cluster. Ansible covers several clouds too, but without built-in state.

Do I need a managed service to run these tools?

No. All six can be run by the team itself, with state stored in a cloud bucket or a backend service. Managed services exist for Pulumi and for Terraform-style runners, and they add run history, policy checks and drift detection. See the vendor site for current pricing.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: software products in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Outgrowing Terraform and weighing what replaces it?

A senior engineer replies within one business day. Or see our DevOps service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call