All Shortcuts

Terraform Shortcuts & Commands — Complete Cheat Sheet (8)

Complete Terraform CLI commands cheat sheet for infrastructure as code. Covers init, plan, apply, state management, workspaces, and import operations.

Related Shortcut Pages

Docker npm / yarn AWS CLI PowerShell tmux GNU Screen

Search all Terraform shortcuts interactively

Interactive Shortcut Finder

All Terraform Shortcuts

Workflow Commands

ShortcutActionDescription
terraform initInitializeInitialize a Terraform working directory.
terraform planPlanPreview changes before applying.
terraform applyApplyApply infrastructure changes.
terraform destroyDestroyDestroy all managed resources.
terraform fmtFormatFormat Terraform files to standard style.
terraform validateValidateValidate configuration files.
terraform state listState listList managed resources.
terraform outputShow outputsDisplay output variable values.
terraform import [resource] [ID]ImportImport existing infrastructure into Terraform state.
terraform workspace listWorkspacesList workspaces.

Frequently Asked Questions

📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

What is the Terraform workflow?

The basic workflow is: terraform init (initialize) → terraform plan (preview) → terraform apply (execute) → terraform destroy (cleanup).

What does terraform plan do?

terraform plan creates an execution plan showing what changes will be made to your infrastructure without actually applying them.

How do I import existing resources into Terraform?

Use 'terraform import resource_type.name resource_id' to bring existing infrastructure under Terraform management.

How do I format Terraform files?

Run 'terraform fmt' to automatically format all .tf files to the canonical style.

What Workflow Commands shortcuts does Terraform have?

Terraform includes 10 Workflow Commands shortcuts, including terraform init (Initialize) and terraform plan (Plan). See the full list in the Workflow Commands section above.

What's the fastest way to learn all Terraform shortcuts?

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.

Can I combine Terraform shortcuts with other tools?

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 All
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

🤖 Ask AI about Terraform shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok