Skill 1.1.1

Infrastructure as code and how it replaces manual provisioning

Key Concepts

Without IaC, infrastructure is built by clicking through web consoles or typing one-off commands. The result depends on who did the work, is hard to reproduce and leaves no record of why a setting was chosen. With IaC, the desired infrastructure is written in text files, such as Terraform's .tf files in the HashiCorp Configuration Language (HCL). The files are stored in version control, reviewed like application code and applied by a tool that calls the platform APIs.

Terraform manages the full lifecycle of each object it defines: it creates it, updates it when the configuration changes and destroys it when the definition is removed. Because the configuration is the source of truth, the same files can build a new environment, rebuild a lost one or show reviewers exactly what exists.