Plain language
| Stage | Individual | Team |
|---|---|---|
| Write | Edit .tf files locally |
Work on a branch in version control |
| Plan | Run terraform plan and read it |
Open a pull request. CI or HCP Terraform posts a speculative plan for reviewers. |
| Apply | Run terraform apply and confirm |
Merge after approval. The pipeline or HCP Terraform applies. |
terraform init runs once before the first plan in any working directory, and again whenever the setup changes (Lesson 3.2). validate and fmt are quality gates you run while writing.
Under the hood
The full sequence is:
write → fmt → init → validate → plan → (review) → apply → … → destroyOnly apply and destroy change real infrastructure.