Introduction
What declarative solves, and the price you pay for it.
Describe your infrastructure instead of clicking it together
A server was created on a Tuesday night, in a web console, by someone who is no longer on the team. It's running, it's serving traffic, and nobody touches it. Six months later, you need the same server in a second region. You open the console and note the machine type, the security group, the disk, the tags, and the image version, then recreate everything by hand. Two weeks later, the new region behaves differently under load. The disk didn't have the same provisioned throughput, a setting nobody thought to note because it was on a different tab.
This scenario isn't a story about incompetence. It's the mechanical consequence of a system whose actual state exists nowhere in readable form. Infrastructure built by hand has no description: it only has a reality, observable solely by querying the provider, and nobody knows which parts of that reality are intentional and which are accidents. You can't read it back, compare it, or rebuild it identically. You can only approximate it.
Terraform addresses this problem by moving the source of truth. Infrastructure is no longer what exists at the provider: it's what is written in versioned files. What exists at the provider is just a reflection, which the tool is responsible for converging toward the description. This inversion is the one structuring concept of the rest of the course; everything else — state, variables, modules — is just its practical consequence.
Comments
Comments are powered by GitHub Discussions
Sign in with GitHub to join the discussion