Infrastructure as Code (IaC) in Site Reliability Engineering (SRE) is the discipline of turning infrastructure into repeatable, version-controlled software. No manual clicks. No guessing. Every resource from servers to load balancers is defined in code, stored in Git, and deployed through automated pipelines. It is the difference between fragile systems and environments built to heal themselves.
The core idea is simple: declare your infrastructure in a language or tool, commit it, and let automation apply it. Common IaC tools include Terraform, Pulumi, AWS CloudFormation, and Kubernetes manifests. For SRE workflows, these tools integrate directly with CI/CD, monitoring, and incident response systems. When a rollback is needed, you change the code and redeploy—fast and exact.
IaC removes configuration drift, the silent killer of reliability. By enforcing the same definitions in dev, staging, and production, SRE teams can reproduce failures, test patches in identical conditions, and apply solutions once to affect all environments. The history lives in your repository, providing clear audits and lowering the risk of human error.