1. Which command shows changes BEFORE applying?
- terraform destroy
- terraform plan
- terraform fmt
- git status
Source: doonops-curriculum/hcl-core--workflow-init-plan-apply.md
Doonops lesson
Master the 3 commands you will use every day: init, plan, apply.
init = download tools. plan = rehearsal (what will change). apply = actually do it.
init installs providers/backends; plan builds graph and diff; apply executes API calls; destroy removes resources.
init = buy ingredients. plan = read recipe aloud to family. apply = cook. destroy = clean kitchen after party.
Layman words first, then technical detail — read slowly
Write .tf files
↓
terraform init ← first time / after new provider
↓
terraform plan ← ALWAYS read this ( + create, ~ change, - destroy )
↓
terraform apply ← type yes (or -auto-approve only in labs)
↓
terraform destroy ← when lab finished (save money)
+ green — will create new~ yellow — will change- red — will destroyBeginners skip plan and get surprises. Treat plan like checking your exam answer sheet before submit.
Modern HCL — names are examples, not from any third-party course
# terraform init # terraform plan # terraform apply # terraform destroy
Terraform runs on your computer — copy this HCL into a folder, then follow the local lab steps below.
Full implementation folder — copy all files, then run terraform commands
Copy every file below into one folder — same as a real repo module. Then run the local lab steps.
Suggested folder: Suggested path: ~/doonops-terraform/05-workflow/
versions.tfSee file purpose in the code belowterraform {
required_version = ">= 1.9.0"
}
2–3 quick questions before the next module
Quick check — did this module stick?
1. Which command shows changes BEFORE applying?
2. First command in a new Terraform folder?