Key takeaway
- Compare Terraform, OpenTofu, CloudFormation, Bicep, Ansible, Chef, Puppet and Salt by job, licence and status, plus a checklist for enterprise teams.
Infrastructure as Code (IaC) tools let teams define servers, networks, databases and policies in version-controlled files and apply them repeatably. The right tool depends on the job: provisioning cloud resources, configuring machines that already exist, or both. Most enterprises end up with a small, deliberate mix rather than one tool. If you need the concept first, start with what is Infrastructure as Code.
This guide compares the tools enterprise teams most often shortlist: Terraform, OpenTofu, AWS CloudFormation, Azure Resource Manager and Bicep, Google Cloud Infrastructure Manager, Ansible, Chef, Puppet, Salt and Rex. It focuses on the decision, not the syntax. For depth on one tool, see our Terraform guide. Product status and licences below were read from vendor and project pages in November 2026; confirm on the official page before you commit.
What do Infrastructure as Code tools actually do?
They fall into two jobs. Provisioning tools create and change the infrastructure itself, such as networks, virtual machines, load balancers and managed databases. Configuration management tools install and maintain software and settings on machines that already exist. Some tools cross the line, so treat the split as a guide.
Two further traits matter in practice. A declarative tool takes the end state you want and works out the steps. A procedural tool runs the steps you write. And some tools keep a record of what they manage (state), while others work from the target system each time. HashiCorp describes Terraform state as the source of truth it uses to plan changes (Terraform introduction).
Which infrastructure as code tool fits which job?
Use the table as a first filter. Each row reflects the vendor or project page named in the sources list at the end of this article.
| Tool | Main job | How you write it | When it fits | Status and notes |
|---|---|---|---|---|
| Terraform | Provisioning | Declarative configuration; write, plan, apply with providers and state | Multi-cloud or multi-service estates that want one workflow | Business Source Licence 1.1 from version 1.6.0, per the licence file; licensor IBM |
| OpenTofu | Provisioning | Terraform-compatible fork, same workflow | Teams that want an open-source, foundation-governed option | Linux Foundation project; repository licence MPL 2.0 |
| AWS CloudFormation | Provisioning (AWS only) | Templates in JSON or YAML, deployed as stacks | AWS-only estates that want AWS-native support | AWS service; stacks managed as one unit |
| Azure Resource Manager and Bicep | Provisioning (Azure only) | ARM JSON templates or the Bicep language | Azure-only estates | Bicep is declarative and compiles to ARM JSON; what-if previews changes |
| Google Cloud Infrastructure Manager | Provisioning (Google Cloud only) | Terraform configurations run as managed deployments | Google Cloud estates, including those leaving Deployment Manager | Google advises migrating from Deployment Manager to it |
| Ansible | Configuration management, some provisioning | YAML playbooks over SSH | Configuring servers and network devices without agents | Agentless and idempotent, per Ansible docs |
| Chef | Configuration management | Recipes and cookbooks on a Ruby DSL | Teams with Ruby skills and a node-based model | Chef Infra Server deprecation notice on the docs site; check migration |
| Puppet | Configuration management | Desired state defined in Puppet code | Teams that want desired state defined in code | Puppet Core described as built on open source Puppet |
| Salt | Configuration management and remote execution | States plus Python modules; master and client daemons | Fast, parallel execution across many nodes | Apache 2.0 licence, per its docs |
| Rex | Light automation | Perl code in a Rexfile over SSH | Small teams that want a flexible, scriptable framework | Apache 2.0; release 1.16.1 listed on CPAN |
What is the Terraform and OpenTofu situation going into 2027?
Terraform is licensed under the Business Source Licence 1.1 from version 1.6.0, with IBM named as licensor and a change licence of MPL 2.0 after four years, according to the licence file in the Terraform repository. IBM announced it completed the HashiCorp acquisition on 27 February 2025 (IBM newsroom).
OpenTofu is a Terraform fork that sits under the Linux Foundation. Its FAQ says existing state files work up to those created with Terraform 1.5.x, that it works with current Terraform providers, and that it uses its own registry. Its repository carries the MPL 2.0 licence (OpenTofu licence). The FAQ gives parity as an aim, not a guarantee, so do not assume it for newer releases. Test your own modules on both before you decide. What the BSL permits for your specific use is a question for your legal team and the licence text.
How do the cloud-native tools compare?
Cloud-native tools give the deepest support for one provider. The trade-off is lock-in to that provider.
AWS CloudFormation
AWS documents CloudFormation as a service where a template describes the resources you want and CloudFormation provisions them, working out dependencies. Stacks let you manage related resources as one unit, and templates can sit in version control. See our Infrastructure as Code on AWS guide for detail.
Azure Resource Manager and Bicep
Microsoft describes Bicep as a declarative language that is a transparent abstraction over ARM JSON templates; it is converted to ARM JSON at deployment, and the what-if operation previews changes. Azure stores the state, so there is no state file to manage (Microsoft Learn). Our Azure Resource Manager guide covers the ARM side.
Google Cloud: Deployment Manager to Infrastructure Manager
The Deployment Manager deprecations page says support has ended and tells users to migrate to Infrastructure Manager or an alternative. Its dates are stated inconsistently on the page (31 March 2026 in the banner, 1 April 2026 in the text), with a service shutdown after 30 June 2027, so confirm the dates on the official page. Infrastructure Manager is a managed service that runs Terraform configurations (Google Cloud docs). Our GCP Infrastructure as Code article covers the move.
Which configuration management tool should you pick?
Configuration management tools keep machines in a known state. All four below suit long-lived servers; container-first estates need them less.
| Tool | Model | What its own documentation says |
|---|---|---|
| Ansible | Agentless, YAML playbooks | Connects over SSH with existing credentials; if a system already matches the playbook, it changes nothing on repeat runs (Ansible docs). See our Ansible guide. |
| Chef | Agent on each node, Ruby DSL | Cookbooks bundle recipes; recipes are Ruby files; Chef Infra Client is the agent on each node (Chef docs). A docs banner says Chef Infra Server is deprecated with end of life on 30 November 2026; confirm on the official page. |
| Puppet | Desired state in Puppet code | Puppet Core is described as built on the foundations of open source Puppet (Puppet docs). Confirm edition and licence terms before adopting. |
| Salt | Server and client daemons, Python | A configuration management and remote execution system, Apache 2.0, using ZeroMQ and AES-encrypted payloads (Salt docs). |
Rex is the lightweight alternative: its site says it is written in Perl, manages remote hosts over SSH, uses a Rexfile of tasks, and supports imperative or declarative styles (rexify.org).
How do you choose an Infrastructure as Code tool?
Answer these questions in order. They usually settle the shortlist before any proof of concept.
- How many platforms do you provision? One cloud points to its native tool. Several clouds or SaaS services point to Terraform or OpenTofu.
- What are your licence and governance requirements? Read the licence text for Terraform and OpenTofu and record the decision.
- Do you manage long-lived servers? If so, add a configuration management tool such as Ansible, Puppet or Salt for what runs on them.
- Where does state live and who can read it? State can hold sensitive values, so decide on storage, locking and access before the first shared deployment.
- What skills do you already have? A Ruby or Perl framework is a poor fit for a team that works in YAML, and the reverse.
- What is the vendor status? Check for deprecations first, as with Google Deployment Manager and Chef Infra Server above.
A common pairing is a provisioning tool for the platform and a configuration tool for what runs on it. IBM describes Terraform and Ansible as a pairing in its acquisition announcement. Our IaC in a CI/CD pipeline article shows how to run either from a pipeline.
What should governance, security and cost look like?
IaC moves infrastructure decisions into code review, so the review process becomes your control point. Four practices matter most.
- Review the plan, not just the code. Terraform, CloudFormation change sets and Bicep what-if all preview changes before applying. Require a human or policy check on that preview.
- Protect state. Terraform documents remote state with locking. Its S3 backend page recommends versioning and offers a lock-file option, with DynamoDB locking marked deprecated (Terraform S3 backend docs). Confirm the current guidance for your backend.
- Pin and commit provider versions. Terraform records them in
.terraform.lock.hcl, which HashiCorp advises committing to version control. - Scan the code. See our IaC security guide for misconfiguration and secrets checks.
Cost control follows from the same discipline: tag resources in code, review the plan for new resources, and destroy short-lived environments from the same files that created them.
How should you adopt IaC tools in sequence?
Start with one workload and one tool. First, put a non-critical environment in version control and recreate it from code. Second, add plan review and state protection. Third, add policy checks and drift detection to the pipeline. Fourth, extend to production and to the second tool only when the first is stable. Starting small lets you settle state and access decisions before they affect the whole estate.
AI assistants can now draft IaC. Treat their output like any other contribution: it passes the same plan review and policy checks. Our article on AI agents and agentic workflows for DevOps covers that pattern. Governed automation of this kind is where ElixirClaw, an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control, and Elixir Govern (formerly AgentGRC), which keeps autonomous agent actions inside policy with the audit trail risk teams need, fit.
When is an IaC tool the wrong choice?
- A single, short-lived environment that nobody will rebuild. The set-up cost outweighs the benefit.
- Imperative one-off tasks, where a script is clearer than a declared state.
- Teams without review and access controls. IaC makes changes faster, so weak controls fail faster.
- Estates tied to a deprecated tool. Plan the migration first, for example from Deployment Manager.
Your agents will also need to act on infrastructure within policy. To map one infrastructure decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop. ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents.
What should you plan for in 2027?
If any of your estate still runs on Google Cloud Deployment Manager, 2027 is when the migration window closes. Google's deprecations page gives two dates to plan around.
- 31 March 2027: the page says the maximum extension for Deployment Manager support ends on this date. Google Cloud deprecations page
- After 30 June 2027: the same page says you will not be able to use the Deployment Manager service and it will be turned down.
- Now: inventory every Deployment Manager configuration, then test a migration to Infrastructure Manager on one non-critical environment before you commit to a schedule.
Check the page itself before you fix dates, because it states the first support date in two different ways.
Frequently asked questions
What is the difference between Terraform and Ansible?
Terraform is mainly a provisioning tool: you declare resources and it plans and applies changes using providers and state. Ansible is mainly a configuration tool: it connects over SSH and runs YAML playbooks that bring machines to a described state. Many teams use both.
Is OpenTofu a drop-in replacement for Terraform?
The OpenTofu FAQ says state files work up to those created with Terraform 1.5.x and that it works with current Terraform providers. Parity is an aim rather than a guarantee, so test your own modules before switching.
Is Google Cloud Deployment Manager still supported?
Google states on its deprecations page that support has ended and recommends migrating to Infrastructure Manager or an alternative. Confirm exact dates on the official page.
Do I need a configuration management tool if I use Terraform?
If you run long-lived servers, usually yes, because Terraform provisions infrastructure while tools such as Ansible, Puppet or Salt manage what runs on it. Container-first estates may need less.
How should I protect Terraform state?
Use a remote backend with locking and versioning, restrict who can read it, and keep sensitive values out of it where possible. Check the current backend documentation for locking options.
Which IaC tool is best for a single cloud?
The cloud-native tool, such as CloudFormation on AWS or Bicep on Azure, gives the closest provider support. The cost is lock-in, so choose a multi-cloud tool if you expect to add providers.
Sources: HashiCorp Terraform docs and licence file; IBM newsroom; OpenTofu FAQ and licence; AWS CloudFormation User Guide; Microsoft Learn Bicep overview; Google Cloud Deployment Manager deprecations and Infrastructure Manager docs; Ansible, Chef, Puppet, Salt and Rex documentation. Read November 2026.
Next Steps for Infrastructure as Code Tools Implementation
Consult with our experts on implementing compound AI systems and how industries and departments use Infrastructure as Code tools alongside Agentic Workflows and Decision Intelligence to unlock the power of automation. Leverage IaC tools to automate and optimize IT support and operations, enhancing efficiency and responsiveness while becoming more decision-centric.
Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE