Last week I built infrastructure by clicking through consoles and running commands. This week I wrote it down as code, built it again, destroyed it, and built something bigger. Five assignments, two clouds, and one rule that mattered more than any of the code: a human reviews every change before it touches the account.
Here's how the week actually went, including the apply that failed halfway.
Part 1: One file, six resources
The first assignment was the smallest: an Azure Linux VM defined entirely in Terraform. A resource group, virtual network, subnet, public IP, network interface, and the VM, all in a single main.tf .
What struck me was how little I had to describe. The NIC points at the subnet, and the VM points at the NIC. Terraform works out the build order from those references, and terraform plan showed me exactly what would be created before anything existed.…