.NET Architecture & System Design Interview Question #185

What is Infrastructure as Code (IaC)?

Deployment, Cloud Operations, SRE & Senior System Design Scenarios Senior Advanced

Quick Interview Answer

Infrastructure as Code defines infrastructure resources through version-controlled declarative or programmatic files rather than relying on manual configuration.

Detailed Explanation

Infrastructure as Code defines infrastructure resources through version-controlled declarative or programmatic files rather than relying on manual configuration.

IaC improves repeatability, reviewability, environment consistency, and disaster recovery. Changes should pass validation and deployment pipelines just like application code, while secrets remain outside ordinary source files.

Code Example

Repository
  |- application code
  |- infrastructure definitions

Pipeline
  -> validate
  -> plan
  -> provision/update