A compact reference to Terraform workflow stages, state boundaries, providers, backends, modules, and HCP Terraform.
| Stage | Purpose |
|---|---|
init |
Prepare backend, providers, and modules. |
fmt / validate |
Normalize configuration and catch local structural problems. |
plan |
Compare configuration, state, and managed remote objects. |
apply |
Perform an approved change. |
destroy |
Remove resources tracked by the selected state. |
| Term | Responsibility | Not the same as |
|---|---|---|
| Provider | Platform API integration | Backend |
| Backend | State storage and possible locking | Provider configuration |
| Resource | Managed object | Data source |
| Data source | Read-only lookup | Adoption into state |
| Module | Reusable configuration | Workspace |
| Workspace | Separate state context | Module |
Use a reference when Terraform can infer a dependency. Use depends_on only for a hidden relationship. Treat import as adoption into state, not resource creation. See the Terraform reference for the full entries.