All Tools View Categories About Contact Privacy

Terraform Subcommand Reference

A reference of core terraform subcommands and their common flags.

Runs entirely in your browser - nothing is uploaded and no Terraform connection is made.

About Terraform Subcommand Reference

The Terraform Subcommand Reference documents the core terraform subcommands that every operator reaches for on a daily basis: init, plan, apply, destroy, import, state and taint (plus untaint). Each entry lists the subcommand purpose and the flags you are most likely to need, drawn from real day to day workflows rather than an exhaustive man page. Instead of grepping the official docs or guessing flag spelling under pressure, you can scan a compact, consistent reference that lives entirely in your browser. The tool is especially useful for onboarding new engineers, for writing runbooks, and for double checking a flag before you paste it into a terminal or a CI script. Because nothing is uploaded and no network call is made, you can use it on a locked down machine during an incident without any external access. It is a reference surface, not a Terraform runner: it never executes commands, never reads your state, and never connects to a backend. Pair it with the generator and validator tools on this site to move from a quick lookup to working configuration.

Beyond the seven headline subcommands, the reference also covers the nested state management commands (list, mv, rm, push, pull) and the positional arguments that taint and untaint expect, such as a resource address. Flags are grouped by how often you will use them, so the common ones surface first and the rarely needed escape hatches are still present when you need them. The live filter means you can type a single token, such as var-file, target or destroy, and immediately see every subcommand whose name, purpose, or flags mention it. The output format toggle then lets you hand the result to a teammate as plain text or as a Markdown table for documentation.

Features

  • Core subcommands - init, plan, apply, destroy, import, state, taint and untaint, each with a clear purpose line.
  • Nested state commands - list, mv, rm, push and pull are covered under the state entry.
  • Common flags - each entry lists frequently used flags with short context such as -out, -target, -var-file and -detailed-exitcode.
  • Purpose text - a one line explanation of what the subcommand does and when to reach for it.
  • Live filter - search by subcommand name, purpose, or any flag, updating as you type.
  • Output format toggle - switch between a plain text list and a Markdown table for docs.
  • Result stats - see how many subcommands match your filter and the total at a glance.
  • Copy / Download / Print - take the reference wherever you need it.

How to Use

  1. Type a keyword in the filter box, such as plan, import, var-file or destroy, and watch the list narrow.
  2. Read the matching entries to confirm the purpose and the flags you intend to use.
  3. Pick an output format from the toggle: Text for a quick paste into chat, Markdown for a README or wiki.
  4. Review the flags and double check spellings before copying them into a terminal.
  5. Copy, download or print the visible reference so your runbook or teammate has an exact copy.
  6. Clear the filter to return to the full list of subcommands whenever you like.

Examples

Example 1: filter "plan" to see terraform plan and its flags like -out, -target, -var-file and -detailed-exitcode, with a note that -detailed-exitcode is handy in CI. Example 2: filter "import" to see terraform import with -provider, -config, -state-out and -var-file, plus the positional address argument. Example 3: switch the output format to Markdown to drop a tidy table straight into a README, then copy it with one click. Example 4: filter "taint" to confirm the address form and the -allow-missing and -lock=false flags before marking a resource for recreation. Example 5: type "destroy" to review the -auto-approve and -target flags so you never accidentally tear down more than intended.

Benefits

  • Fast lookup - find a subcommand and its flags in seconds without leaving your machine.
  • Fewer mistakes - confirm flag spelling and arguments before you run them for real.
  • Portable - copy, download or print for runbooks, onboarding and training material.
  • Private - everything runs in the browser, no upload, no network, no credentials.
  • Doc ready - the Markdown format produces tables you can paste into wikis directly.
  • Confidence under pressure - a calm, consistent reference during incidents when memory fails.

Frequently Asked Questions

What is this?
A reference of the main Terraform subcommands with their common flags and typical usage.
Which subcommands are covered?
init, plan, apply, destroy, import, state and taint (and untaint).
Can I filter?
Yes. Type a subcommand name or flag to narrow the list.
Does this connect to Terraform?
No. The reference is rendered in your browser and nothing is uploaded.
Can I copy it?
Yes. Copy the visible reference, download it as a text file, or print it.