Why Terraform, and where it fits among IaC tools

Beginner · 9 min

Why teams reach for Terraform: one workflow and one language across clouds. And where Ansible, CloudFormation, Pulumi and OpenTofu overlap with it or differ.

Bryan Krausen · 26 min · from 2:22

Why Terraform, and where it fits among IaC tools

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by Bryan KrausenReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • Terraform keeps a record of what it built, compares your code against reality, and applies only the difference. That loop is the product.
  • Its main selling point is one language and one workflow for many providers, not just clouds: DNS, GitHub, Datadog and Kubernetes all have providers.
  • Terraform provisions infrastructure. Ansible configures what runs on it. CloudFormation and Bicep do Terraform's job for one cloud. Pulumi does it in a general-purpose language.
  • OpenTofu is the open-source fork. The language and workflow are shared, so choosing between them is mostly a licensing and governance decision.

The problem it was built for

Picture a company six years into AWS. The network was clicked together in the console by someone who has left. The database was made by a script that lives on one laptop. A second team uses Azure and keeps its own spreadsheet of what exists. Asked “what would it take to rebuild production in another region?”, nobody can answer without a week of archaeology.

Infrastructure as code answers that by turning the setup into files you can read, review and re-run. The earlier lesson built a toy that compared a desired list of servers with a JSON file. Terraform is that idea at industrial scale, and this roadmap is about using it well. The devops roadmap has a one-lesson survey. Here we go much deeper.

What the tool actually does

Terraform’s whole trick is a loop of four steps:

  1. You describe what should exist, in .tf files.
  2. Terraform reads its state, its record of what it created last time.
  3. It asks each provider what is really there now.
  4. It computes the difference and shows it as a plan. If you approve, it makes only those API calls.

Everything else in the tool exists to support that loop. Providers translate between Terraform and an API. State remembers which real object belongs to which block of code. The dependency graph decides the order. I will take each one apart in later lessons.

The reach is wider than people expect. A provider is a plugin for one API, and the public registry lists them for far more than clouds. I asked the registry about the three I use most:

$ for p in random time null; do curl -s https://registry.terraform.io/v1/providers/hashicorp/$p | jq -c '{name,version,downloads}'; done
{"name":"random","version":"3.9.1","downloads":3662037886}
{"name":"time","version":"0.14.2","downloads":1479028108}
{"name":"null","version":"3.3.2","downloads":2785973796}

Those are small utility providers, yet each has been downloaded over a billion times. That tells you how much of the ecosystem is plumbing around the loop, not clouds.

Where it sits next to other tools

The categories get blurred in marketing, so here is a plain split.

  • Ansible, Chef, Puppet configure machines: install a package, template a file, restart a service. They can create cloud resources, but they do not keep a durable record of what they own the way Terraform’s state does. Many teams provision with Terraform and configure with Ansible. See configuration management with Ansible.
  • CloudFormation (AWS) and Bicep (Azure) do the same job as Terraform for one cloud. They are often first to support a new service, and the cloud keeps the state for you. The price is lock-in: the skills and code do not move.
  • Pulumi and the CDK family let you write infrastructure in TypeScript, Python or Go. If your team already thinks in loops and classes, that is attractive. The cost is that general-purpose code can do anything, including things that are hard to review in a plan. Terraform’s HCL is deliberately limited, which keeps configs easy to read but makes some logic awkward.
  • Crossplane runs the same idea inside Kubernetes, with controllers continuously reconciling instead of a human running apply.
  • OpenTofu is the fork of Terraform made after HashiCorp changed its licence in 2023. It is a drop-in for most work.

There is no winner. Terraform’s strength is the largest provider ecosystem and the most shared knowledge: when something breaks at 2 a.m., somebody has hit it before. Its weakness is that you own the state file, and a few things a general language handles easily take effort in HCL.

Current versions

HashiCorp’s update service and GitHub tell me what is current, as of 28 November 2026:

$ curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r .current_version
1.17.2
$ curl -s https://api.github.com/repos/opentofu/opentofu/releases/latest | jq -r .tag_name
v1.13.10

The version numbers have diverged, so do not read “1.17 versus 1.13” as “four releases behind”. Each project has its own numbering and feature list. I will say which tool a feature belongs to whenever it matters.

About the video

The embed is the section “Benefits of IaC” through “Comparing IaC tools” and the start of “How terraform works” (2:22 to 10:52) from Bryan Krausen’s “Introduction to Terraform and Infrastructure as Code (IaC)”, published August 2024, 25 minutes in full. I chose it for its tool-comparison chapter. I judged the content from the title, description and chapter list and did not check every claim. It is a general talk, so the OpenTofu point and the details above are mine. The deeper links are HashiCorp’s own overview and a short 2026 comparison whose description links to a vendor of a competing tool, so weigh it accordingly. English was judged from the title, channel and an English auto-caption track.

Where this fits

This is the map for the rest of the roadmap. Next, get a working binary on your machine and pin it so everyone on a team runs the same one: installing and pinning Terraform and OpenTofu.

Check yourself

  1. 01A teammate says Ansible and Terraform do the same thing. What is the short version of the difference?

    Terraform creates and tracks infrastructure objects such as networks, databases and servers, and knows what it owns through state. Ansible mostly logs in to machines and configures them. They are often used together.

  2. 02What do you give up by choosing CloudFormation over Terraform on AWS?

    Portability and breadth. CloudFormation only manages AWS, so a DNS record at another vendor or a GitHub repository needs a different tool. You gain tight AWS integration and no state file to manage.

  3. 03Why does the existence of OpenTofu not mean you have to learn two tools?

    Both read the same HCL and use the same providers and state format, so the daily workflow is identical. The differences show up at the edges, such as licence, registry and a few newer features in each.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark