Skip to content

CONCEPT Cited by 9 sources

Infrastructure as code

Definition

Infrastructure as code (IaC) defines infrastructure (networks, load balancers, gateways, IAM, databases) in version-controlled files, and a tool applies those files to create or change the real resources. Most modern IaC is declarative: the file states the wanted end state, and the tool (Terraform, CloudFormation, CDK) computes and applies the diff.

What IaC gives a system:

  • Reproducibility and environment parity. The same definition builds dev, staging, prod, or a DR Region, so environments do not drift apart.
  • Review and audit. Every change is a reviewed commit, which is a natural audit trail for compliance.
  • Recovery. If the definitions survive, a destroyed environment can be rebuilt. Ransomware-recovery designs use this to rebuild infrastructure in a separate recovery environment.
  • Self-service. A platform team can publish IaC modules that product teams call (concepts/self-service-infrastructure).

Costs: state management (Terraform state is itself critical data), drift when people change resources outside the tool, and slow apply loops for large stacks. The same idea applied to monitoring is patterns/alerts-as-code.

Seen in

Last updated · 854 distilled / 2,448 read