Lesson 1 · Terraform fundamentals
What IaC is & the plan/apply cycle
Infrastructure as reviewable, version-controlled code — the foundation the whole track has been standing on.
Your win: explain what Infrastructure as Code is and why it beats clicking cloud consoles, and describe Terraform's declarative model and the write → plan → apply loop — which will feel familiar after Kubernetes.
The problem: infrastructure by hand doesn't scale
Someone has to create the GKE clusters, the VPC, the buckets, the databases, the service accounts that Courses 2–6 assumed already existed. Do it by clicking the GCP console and you get: no record of what was done, no review, no reproducibility (was prod set up the same as staging?), and no undo. Infrastructure as Code fixes this — you define infrastructure as code, checked into git, reviewed in PRs, and applied by a tool.1
Terraform is declarative — you'll recognize this
Terraform (HashiCorp's IaC tool) is declarative: you describe the desired end-state ("a cluster with these node pools, a bucket with these settings"), not the step-by-step commands to build it. Terraform figures out what to create, change, or destroy to make reality match.2
The core loop: write → plan → apply
terraform plan shows you exactly what will change before anything
happens — the create/update/destroy list. That "destroy" column is why you
always read a plan: a careless config change can propose deleting a database. Plan is the
"measure twice"; apply is the "cut once." Reviewing plans is the single most important IaC
habit.
Terraform — What is IaC? + the core workflow
The declarative model and the write/plan/apply loop, from HashiCorp.
→ hashicorp — What is IaC with Terraform?
→ hashicorp — Core workflow
Check yourself (from memory)
Q1. Terraform's model is best described as…
Q2. terraform plan is important because it…
Q3. IaC beats clicking the console mainly because it's…
terraform plan (preview the diff vs STATE — read the DESTROY column!) → apply
(make exactly those changes + update state). Plan-before-apply = the safety gate. REPO:
deployments/terraform/{modules,live} (Terragrunt) provisions the clusters/VPC/
Cloud SQL/KMS/Workload Identity of Courses 2–6; applied via Atlantis on PRs, not by hand.terraform plan output, or why declarative beats a bash script
of gcloud commands? Ask me — providers & resources are Lesson 2.
1. HashiCorp — What is Infrastructure as Code with Terraform?