IaC

No Change
adopt
First Added:December 1, 2023 Updated: July 7, 2026

Infrastructure as code (IaC) manages and provisions environments through versioned, machine-readable definitions instead of manual console changes. We adopt it as the foundation for Shift Left, DevSecOps, and GitOps delivery.

Blurb

Infrastructure as code (IaC), also known as software-defined infrastructure (SDI), is the process of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.

Summary

When to use:

UseNotes
Repeatable environmentsDev, staging, and prod share the same definitions with parameter differences
Reviewable changePRs show diffs before apply; auditors get Git history
Drift controlReconcilers detect and correct config that drifted from declared state
Security gatesPair with Policy as Code scanners on every PR

When to skip:

  • Ephemeral sandboxes you tear down in hours and never reproduce
  • One-off experiments where a console click is faster than codifying
  • Teams with no Git or PR culture yet (fix process before scaling IaC)

Garden split: Declarative IaC (adopt) for desired-state files; Imperative IaC (hold) for generators that hide side effects. See child notes for tool tables and anti-patterns.

Related practices: GitOps applies IaC through merge workflows. Shift Left and DevSecOps expect infra changes in the same pipeline as application code.

Details

Declarative vs Imperative

StyleArtifactGarden stance
Declarative IaCDesired end state (HCL, YAML, JSON)adopt
Imperative IaCPrograms that call cloud APIshold

Declarative IaC lets reviewers see what should exist. Engines compute diffs and handle ordering. Imperative generators can be smaller but make blast radius harder to predict.

Common Surfaces

SurfaceExamples
Cloud accountsTerraform / OpenTofu
Kubernetesmanifests, Helm charts
Cluster deliveryGitOps controllers reconcile Git state
PolicyPolicy as Code lint before merge

Operating Discipline

TopicNotes
StateRemote backends or cluster etcd; lock and back up
SecretsNever in Git; use secret managers and external data sources
ModulesDRY through modules and variables, not imperative codegen
ImportBootstrap tools like terraformer can help; refactor into modules after

References