Glossary

Infrastructure as code

Infrastructure as code is the practice of defining infrastructure in versioned, machine-readable files rather than configuring it by hand.

Short answer

What is infrastructure as code?

Infrastructure as code is the practice of defining infrastructure in versioned, machine-readable files rather than configuring it by hand.

Explained two ways

Plain and technical

In plain terms

Instead of clicking through a cloud console to create servers and networks, you describe what you want in files kept in version control. The same files can recreate the environment, and every change has a history.

Technically

Infrastructure as code tools are declarative (you describe the desired state and the tool computes the changes required), and are typically applied through a plan-and-apply cycle so the changes can be reviewed. The main operational concern is drift: infrastructure modified outside the code no longer matches the declaration, which is detected by comparing state against live inventory.

Example

What it looks like in practice

A Terraform module defines a VPC, subnets and a cluster. A change is proposed as a pull request, the plan is scanned for insecure configuration, and applying it produces exactly the reviewed change.
Keep going

More definitions

See these concepts in a running system

A 30-minute walkthrough against your own infrastructure rather than a slide about the theory.