System Design Space
Knowledge graphSettings

Updated: February 21, 2026 at 11:59 PM

Infrastructure as Code

mid

IaC practice for cloud-native: declarative models, state management, reusable modules, drift detection and secure rollout strategies.

Context

Cloud Native Overview

IaC transforms infrastructure from a manual effort into a repeatable engineering process.

Open chapter

Infrastructure as Code is the discipline of platform management through versioned declarations and controlled pipelines. The main advantage is repeatability and auditability, the main requirement is a strict engineering process around changes.

Basic principles

  • The infrastructure is described declaratively and versioned in the same way as application code.
  • Changes undergo review, policy checks and an automated plan/apply pipeline.
  • Repeatability is more important than manual speed: the same pattern unfolds the same way in different envs.
  • Any drift between the code and the actual infrastructure must be detected and corrected.

Architectural areas of attention

State management

Store state centrally, with lock and versioning. The loss of state destroys the controllability of changes.

Module boundaries

Structure modules by domain ownership. Avoid giant root modules with implicit dependencies.

Secrets & config

Secrets should not live in an IaC repository. Use secret managers and short-lived credentials.

Policy as code

Fix the required guardrails: naming, encryption, network policy, quotas, region restrictions.

Next

GitOps

GitOps extends IaC through pull-based reconciliation and continuous drift correction.

Open chapter

Tool selection

Terraform/OpenTofu

Standardized multi-cloud provisioning and mature provider ecosystem.

Pulumi/CDK

Infrastructure as full-fledged code in programming languages with reusable abstractions.

Kubernetes manifests + controllers

Declarative management of cluster resources and platform API at runtime.

Practical checklist

  • There is a single workflow plan/apply with a mandatory review and audit trail.
  • Critical changes go through policy-gates before merge/apply.
  • State backend is protected, versioned and has a backup/restore runbook.
  • Regular drift detection is carried out in all key environments.
  • There is a strategy of modular decomposition and ownership by teams.

References

Related chapters

Enable tracking in Settings

System Design Space

© 2026 Alexander Polomodov