Why it matters

IaC enables reproducible, reviewable infrastructure. Understanding shapes cloud infrastructure practices.

Advertisement

The architecture

Declarative: describe desired state; tool computes changes.

State: track actual state. Terraform state file.

Provider: abstraction over cloud APIs.

IaC modelDeclarative codeHCL / JSON / PythonStateactual vs desiredApplycompute + execute diffState drift: manual changes desync state file; recover via import or refresh
IaC operation.
Advertisement

How it works end to end

Modules: reusable infrastructure components.

Environments: same code, different variables per env.

Drift: manual changes desync state. Detect via terraform plan.

Review: infrastructure changes in PRs like code.