Complete Terraform CLI commands cheat sheet for infrastructure as code. Covers init, plan, apply, state management, workspaces, and import operations.
Terraform is a popular DevOps/CLI tool used by professionals worldwide. Learning keyboard shortcuts can dramatically speed up your workflow — studies show shortcut users save an average of 8 days per year compared to mouse-only users.
This page covers all 10 Terraform shortcuts across 1 categories: Workflow Commands. Each shortcut includes a description to help you understand when and how to use it effectively.
Start with the essentials: Learn terraform init (Initialize) and terraform plan (Plan) first — these are the most commonly used.
Practice daily: Pick 2–3 new shortcuts each day and consciously use them instead of the mouse. Within a week, they become muscle memory.
Print this cheat sheet: Keep a reference nearby until shortcuts become automatic. Focus on the Workflow Commands category first.
CLI tip: Create shell aliases for the commands you use most. Combine them with these shortcuts for maximum efficiency.
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. |
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.
Browse shortcuts for 248 platforms
Explore All