Terraform Workflow and State Quick Reference

A compact reference to Terraform workflow stages, state boundaries, providers, backends, modules, and HCP Terraform.

On this page

Core workflow

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.

Boundaries that matter

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.

Revised on Friday, September 11, 2026