Infrastructure as Code
Subject: Computer and Technology noun /ˈɪn.frəˌstrʌk.tʃər əz ˈkoʊd/ 1 definition
- cloud-computing
- infrastructure-automation
- configuration-management
- software-deployment
-
Definition (noun)
Entry #108 · UpdatedInfrastructure as Code (IaC) is the practice of defining, provisioning, and managing computing infrastructure—such as servers, networks, load balancers, and storage—through versioned, machine-readable configuration files rather than manual setup or interactive administrative consoles. By treating infrastructure specifications like application source code, engineering teams can store topologies in version control, validate modifications through automated testing and peer review, and replicate identical environments reliably across development, staging, and production. Rather than replacing runtime application logic or monitoring tools, IaC establishes a repeatable, auditable control layer for infrastructure lifecycles that reduces configuration drift and manual operational error.
Common Forms
Declarative IaC: Defines the desired end state of infrastructure resources using configuration formats such as HCL, YAML, or JSON, leaving the provisioning engine to resolve dependencies and compute the required changes automatically.
Imperative IaC: Specifies an explicit, step-by-step sequence of commands or procedural API calls that instruct the platform directly on how to create, modify, or tear down resources.
Push-Based Provisioning: Executes infrastructure updates outward from a central workstation or CI/CD runner directly against cloud APIs or target nodes during a triggered deployment run.
Pull-Based Reconciliation: Runs a controller or agent inside the target environment that periodically fetches desired-state definitions from source control and continuously reconciles live resources against that specification.
Example
When launching a new payment service, a platform engineer commits a Terraform module defining a Virtual Private Cloud (VPC), private subnets, a managed PostgreSQL database, and autoscaling compute instances to a Git repository. Once the pull request passes automated plan checks and peer review, the CI/CD pipeline runs
terraform applyto provision identical, auditable environments in both staging and production without manual console changes.