home / cloud / terraform

Terraform

Official · HashiCorp
48k

Infrastructure-as-code CLI for planning, applying, and inspecting Terraform-managed infrastructure, state, and outputs.

$brew tap hashicorp/tap && brew install hashicorp/tap/terraform
Language
Go
Stars
47,906
Category
Cloud & Storage
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

Terraform is HashiCorp's CLI for planning, applying, and inspecting infrastructure changes defined in HCL. It covers the full local workflow around state, outputs, providers, modules, imports, validation, and remote backend operations.

What It Enables
  • Preview infrastructure changes, save execution plans, and apply or destroy resources across supported providers and backends.
  • Inspect current state, output values, module dependencies, provider schemas, and version data when debugging or generating follow-up automation.
  • Format, validate, import, and test Terraform configurations before shipping them through CI or agent-managed infrastructure workflows.
Agent Fit
  • JSON views across many commands, plus plain stdout, stderr, and exit codes, make Terraform workable in shell-driven inspect/change/verify loops.
  • Saved plan files, -detailed-exitcode, -input=false, and -auto-approve let agents separate review from execution instead of relying on prompts.
  • Best fit when an agent is operating in a prepared workspace with initialized providers, backend access, and clear approval rules for destructive changes.
Caveats
  • Real runs depend on provider credentials, initialized plugins, and reachable remote backends, so many failures come from the target systems rather than the CLI itself.
  • Some machine-readable modes can expose sensitive values, and unattended applies still need explicit approval settings or precomputed plan files.