Infrastructure as code explained: Terraform, OpenTofu, and when the console is fine
Infrastructure as code defines servers, networks and DNS in versioned config files that a tool applies through provider APIs: write, plan, apply. What Terraform and OpenTofu actually document, how the August 2023 license change split them, what the state file is and why losing it hurts, and when clicking in a console is still the right call - from HashiCorp's and OpenTofu's own documentation, read 21 November 2026.
Per HashiCorp's and OpenTofu's own documentation, read 21 November 2026: infrastructure as code (IaC) means defining cloud and on-prem resources - compute, storage, networking, DNS entries, SaaS features - in human-readable configuration files that you can version, reuse and share, instead of clicking them into existence in a web console. Both Terraform and OpenTofu describe the same three-stage workflow: you write the configuration, the tool creates an execution plan describing what it will create, update or destroy, and on your approval it applies those operations in dependency order. The question this article answers: when does that workflow pay off, when is the console still fine, and what actually differs between the two tools after 2023's license split. No default winner.
What the tools actually do
Terraform and OpenTofu manage resources on cloud platforms and other services through their APIs: providers - thousands of them, on the Terraform Registry and the Public OpenTofu Registry - connect the tool to AWS, Azure, Google Cloud, Kubernetes, Cloudflare, GitHub and many more. The configuration is declarative: you describe the end state, and the tool builds a resource graph, works out dependencies, and creates or modifies non-dependent resources in parallel. Reusable collections of configuration ship as modules, so a team can standardize how, say, a VPC or a database gets created. Because the configuration lives in files, it goes into version control: infrastructure changes get the same diff, review and history as code changes.
The state file: the part that surprises people
Both tools keep a state file that records bindings between the resources declared in your configuration and the real objects they created remotely. Before any operation, the tool refreshes state against the real infrastructure and uses it to decide what changes to make. Per HashiCorp's state documentation, the default is a local terraform.tfstate file (plus a backup of the previous state) - fine for a solo experiment, but it limits collaboration and losing the file means losing the map of what the tool manages. The same documentation recommends a remote backend for teams, and warns against storing state in a version control system or any store without state locking and secure access control: state can contain secrets, and concurrent writes can corrupt it. Treat the state file as production data from day one.
Terraform vs OpenTofu after the 2023 license change
On August 10, 2023, HashiCorp announced that its products, including Terraform, would move from the open-source MPL 2.0 license to the Business Source License (BSL) 1.1 in their next releases; its licensing FAQ, which HashiCorp calls its binding interpretive guidance, spells out the terms. OpenTofu is the community fork that followed: per its own site, it is an open-source, Linux Foundation-stewarded tool that is a drop-in replacement for Terraform, with a current ecosystem of 3,900+ providers and 23,600+ modules. Both tools use the same configuration language, the same workflow and largely the same provider ecosystem. Compatibility is a goal with a process, not a guarantee: OpenTofu's own migration page says it aims to maintain compatibility with Terraform configurations and that most Terraform code works without modification, yet still recommends following its migration guide - back up state and code, install, initialize and verify, then test with a small change - and flags interdependent configurations as needing additional care. For a team choosing today: Terraform is the original, backed by HashiCorp, under a source-available license that restricts competitive offerings; OpenTofu is the community-governed open-source option. The practical differences for ordinary use are small today; the license and governance difference is the real fork in the road, and your legal team's reading of BSL 1.1 - not this article - settles which side of it you stand on.
When it pays off - and when the console is fine
This part is judgment, not vendor fact. IaC tends to pay off when any of these hold: you manage the same environment more than once (staging plus production, disaster recovery, per-customer setups); more than one person touches the infrastructure and you need review and history; you want to rebuild an environment from a definition rather than from memory; or compliance asks who changed what, when. The console tends to be fine when you are learning a cloud, running a one-off experiment, or managing a single server you could rebuild in an afternoon. The honest cost: IaC adds the state file to protect, a plan-review habit to build, and a tool to learn - for a one-person project with three resources, that overhead can exceed the benefit, and adopting it later, when the second environment appears, is a legitimate path.
What infrastructure as code does not do
IaC manages infrastructure resources. It does not deploy your application code into them, monitor them, back them up, or respond to incidents - those remain yours. And the safety rails are procedural, not magic: plan shows you what apply will do, including destroys, but apply performs whatever you approve, so reviewing plans is a habit the team must actually keep. Versioned configuration plus reviewed plans is a discipline you operate, not a guarantee you buy.
Sources, all read 21 November 2026: developer.hashicorp.com, What is Terraform (IaC definition; write-plan-apply workflow; providers via APIs; Terraform Registry); developer.hashicorp.com, State (state purpose and bindings; default local terraform.tfstate plus backup; remote-backend recommendation; warning against VCS state storage without locking and access control); hashicorp.com, Licensing FAQ (August 10, 2023 announcement; BSL 1.1 for next releases; FAQ described by HashiCorp as binding interpretive guidance); opentofu.org (open-source under Linux Foundation stewardship; drop-in Terraform replacement - vendor's own claim; 3,900+ providers and 23,600+ modules); opentofu.org, What is OpenTofu (same workflow, registry, modules, cloud backends); opentofu.org, Migrating from Terraform (aims to maintain compatibility; most Terraform code works without modification; back-up-verify-test process; interdependent configurations need additional care).
Putting your infrastructure under code review? Omnistu's Cloud, Data and DevOps practice works on hosting setup, deployment pipelines, monitoring and data infrastructure - write to team@omnistu.com with what you are deciding.
Frequently asked questions
What is infrastructure as code in one sentence?
Defining your cloud and on-prem resources - servers, networks, DNS, SaaS features - in human-readable, version-controlled configuration files, then letting a tool create and manage those resources through provider APIs, per both Terraform's and OpenTofu's own documentation.
What is the difference between Terraform and OpenTofu?
Same configuration language, same write-plan-apply workflow, largely the same provider ecosystem. The real difference is license and governance: HashiCorp moved new Terraform releases to the Business Source License 1.1 starting with the releases that followed its August 10, 2023 announcement (earlier releases keep their original license), and OpenTofu is the Linux Foundation-stewarded open-source fork whose docs say most Terraform code works unmodified - test with its migration guide before switching. Read HashiCorp's licensing FAQ and your own counsel's advice before choosing on legal grounds.
What is the Terraform state file?
A record of bindings between the resources in your configuration and the real objects the tool created, refreshed before every operation and used to decide what changes to make. Per HashiCorp's docs it defaults to a local terraform.tfstate file, should move to a remote backend for team use, and must not go into version control without locking and access control - it can contain secrets.
Is infrastructure as code worth it for a small team?
Judgment, not fact: it pays off when you repeat environments, share the work, need change history, or must rebuild from a definition. For one person learning a cloud or running a one-off experiment, the console is fine and adopting IaC later is a legitimate path - the state file and plan-review habit are real overhead.
Does Terraform deploy my application too?
No. Terraform and OpenTofu manage infrastructure resources through provider APIs. Deploying application code, monitoring, backups and incident response stay with you; plan's safety value depends on someone actually reviewing it before apply.
Can I adopt IaC for infrastructure that already exists?
Yes - both tools support importing existing resources into state, per their documentation, though HashiCorp's state docs note you then own keeping the one-to-one binding between configuration and real objects correct. Many teams start by writing configuration for new resources and importing the old ones gradually.