Complete Terraform CLI commands cheat sheet for infrastructure as code. Covers init, plan, apply, state management, workspaces, and import operations.
Search all Terraform shortcuts interactively
Interactive Shortcut Finder| Shortcut | Action | Description |
|---|---|---|
| terraform init | Initialize | Initialize a Terraform working directory. |
| terraform plan | Plan | Preview changes before applying. |
| terraform apply | Apply | Apply infrastructure changes. |
| terraform destroy | Destroy | Destroy all managed resources. |
| terraform fmt | Format | Format Terraform files to standard style. |
| terraform validate | Validate | Validate configuration files. |
| terraform state list | State list | List managed resources. |
| terraform output | Show outputs | Display output variable values. |
| terraform import [resource] [ID] | Import | Import existing infrastructure into Terraform state. |
| terraform workspace list | Workspaces | List workspaces. |
The basic workflow is: terraform init (initialize) → terraform plan (preview) → terraform apply (execute) → terraform destroy (cleanup).
terraform plan creates an execution plan showing what changes will be made to your infrastructure without actually applying them.
Use 'terraform import resource_type.name resource_id' to bring existing infrastructure under Terraform management.
Run 'terraform fmt' to automatically format all .tf files to the canonical style.
Terraform includes 10 Workflow Commands shortcuts, including terraform init (Initialize) and terraform plan (Plan). See the full list in the Workflow Commands section above.
Print the Terraform cheat sheet and keep it next to your keyboard for the first week, then switch to active recall: open Shortcut Speedrun and practice Terraform shortcuts against the clock until they're automatic.
Yes — use My Stack to combine Terraform shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.
Browse shortcuts for 269 platforms
Explore AllOpen your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"