IT Glossary
Infrastructure as Code (IaC), explained
The practice of describing servers and networks in code files, so that infrastructure can be recreated identically and automatically.
- 6
- sections
- 6
- questions answered
Infrastructure as Code (IaC) is the practice of describing servers, networks, databases and security rules in versioned text files, from which a tool such as Terraform, OpenTofu or CloudFormation creates and changes the infrastructure automatically, identically on every run. The files sit in Git next to the application, and the tool compares what they say with what exists and changes only the difference.
Ask who could rebuild your production environment from nothing if the account were lost tomorrow. In most companies the honest answer is a name, and often that name left last year. Infrastructure as Code replaces the person with a file. Running it against an empty account produces the same environment; running it against an existing one changes only what differs. Because the files live in version control, every infrastructure change is reviewed like code, the history shows who altered a firewall rule and when, and test environments become identical to production instead of approximately similar. For a buyer this is one of the sharper due-diligence questions available: a supplier who can produce the definition files can hand the system over, rebuild it after an incident and prove what is running.
Why it matters for your business
The key-person dependency disappears
The environment is described in reviewable files rather than in the recollection of whoever originally clicked through the setup.
Disaster recovery measured in hours
Code recreates servers, networks and permissions in a new region or account from one command. Databases and files come back from backups, so backups stay necessary.
Identical environments, fewer surprises
Test and production are generated from the same source, which removes the failures that appear only after release.
How it works: files, plan and state
There are two ways to describe infrastructure. The declarative way states the desired end state (“one virtual machine, one firewall rule, one database”) and the tool works out the steps. The imperative way lists the steps one after another, like a script. Terraform and OpenTofu are declarative: the core workflow has three stages, write the files, review the plan, apply the changes, through terraform init, terraform plan and terraform apply (tofu init, tofu plan, tofu apply in OpenTofu).
The tool keeps a state file recording what it has already created; HashiCorp's documentation calls it the source of truth the files are compared against. An example: a file declares one server, one firewall rule and one database, and the plan lists three resources to create; after apply, the next plan has nothing to do. If someone then edits the firewall rule in the cloud console, the plan shows the difference, known as configuration drift, and you either correct it or record it deliberately in the files.
Tools: provisioning and configuration
Some tools create the resources (provisioning): Terraform, OpenTofu, AWS CloudFormation (and AWS CDK, which describes the same resources in programming languages), Azure Bicep for Azure, and Pulumi, which uses ordinary programming languages. Others configure the inside of a server once it exists: Ansible, Chef or Puppet install packages, configuration files and services.
Kubernetes manifests describe what runs inside a cluster, not the cluster itself, which is usually created by a provisioning tool. Real environments typically combine two of these categories, which is normal. What matters is that nothing essential exists only in a console.
Want an estimate for your project?
Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.
The 2023 Terraform licence change and the OpenTofu fork
On 10 August 2023 HashiCorp announced that future Terraform releases would move from the Mozilla Public License 2.0 to the Business Source License 1.1 (BSL). Terraform 1.5.7, from 7 September 2023, is the last release under MPL 2.0; 1.6.0, from 4 October 2023, is the first under BSL. The licence text says each version converts to MPL 2.0 four years after publication. The licensor is now IBM, which completed its acquisition of HashiCorp on 27 February 2025.
BSL is a source-available licence, not an open source licence under the OSI definition. The restriction concerns offering the product to third parties, hosted or embedded, in competition with the licensor's paid products; the text states explicitly that using it for internal purposes within an organisation is not a competitive offering. After the change the community started OpenTF, which the Linux Foundation announced on 20 September 2023 under the name OpenTofu. It stays under MPL 2.0, its first stable release (1.6.0) came on 10 January 2024, and since 23 April 2025 it is a CNCF project at the Sandbox level. The project presents it as a drop-in replacement for Terraform and offers optional encryption of state and plan files.
Our reading, not legal advice: a company that uses Terraform to run its own infrastructure stays within the licence; the restriction matters for vendors selling a competing product. Teams that want an open source licence or foundation governance choose OpenTofu, and configurations written for Terraform 1.5 run on it. Checked on 18 November 2026 on hashicorp.com and opentofu.org.
What to ask a supplier
Ask that the definition files live in a code repository your company owns, not in the supplier's account. Ask where the state file is stored and who can read it: stored locally, it holds the secrets from the configuration in plain text, so it belongs in remote storage with encryption. Every change should pass review (a pull request) and the automated delivery pipeline (CI/CD).
Ask also for a documented rebuild test in an empty account, and separate backups for data, because IaC rebuilds the infrastructure, not the contents of the databases. A supplier who can show the files can hand the system over, rebuild it after an incident and prove what is running; one who cannot is selling a configuration that exists in one place and in one person's memory.
Frequently asked questions
Which Infrastructure as Code tools are most commonly used?
Terraform and its fork OpenTofu work across several cloud providers; CloudFormation and Bicep are the native options for AWS and Azure, and Ansible configures machines once they exist. Terraform has been under the source-available BSL since version 1.6.0, while OpenTofu remains under MPL 2.0.
Is it worth it for a small setup of two or three servers?
Yes, because the effort is small at small scale: you get documentation that cannot go stale and the ability to rebuild after an incident or a provider change. Retrofitting dozens of hand-configured servers is a serious project, so the earlier you start, the less it costs.
How does this differ from a plain installation script?
A script describes steps and may fail or duplicate things when run twice. Infrastructure as Code describes the desired end state and the tool works out what to create, change or delete so reality matches it, which makes it repeatable and safe to run again.
Is Terraform still open source?
No, not since version 1.6.0 (4 October 2023): it is licensed under BSL 1.1, which is source-available. Version 1.5.7 was the last under MPL 2.0, and each version converts to MPL 2.0 after four years. Internal use is permitted; OpenTofu is the MPL 2.0 alternative.
What is the difference between IaC and IaaS?
IaaS means servers and networks rented from a cloud provider; IaC is the way you describe and create them, through code files. The two are often combined, but IaC also works on local virtualisation, not only in the cloud.
Is Kubernetes an Infrastructure as Code tool?
Partly: Kubernetes manifests declaratively describe the applications in a cluster, so they are IaC in character. The cluster itself, the network and the accounts are usually created with Terraform or OpenTofu, and a complete environment uses both.
Let’s talk about your project
Book a free 30-minute call or send us an email. We reply the same working day.
office@northdan.com · +40 750 252 851