Skip to content

Instantly share code, notes, and snippets.

@pbchekin
pbchekin / 01-iac-is-not-what-it-should-be.md
Created September 30, 2025 21:02
IaC is not what it should be

IaC is not what it should be

The core concept of the Infrastructure as Code (IaC) is the code that is used to manage the infrastructure. In most cases, the code is in version control. There are two approaches to IaC: declarative and imperative ("what" versus "how"). The most popular declarative approach uses definitions of the desired state of the infrastructure. The imperative approach uses scripts, playbooks to define a process, a sequence of steps that need to be applied in a certain order to achieve the desired state of the infrastructure. From the practical perspective, most non-trivial projects use both declarative and imperative parts. For example, Terraform configurations and scripts or CI/CD workflows to apply Terraform configurations in the right order. Historically IaC requires using specialized formats, languages to define the infrastructure, and specialized tools to apply changes.