Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Terraform

$ terraform Official High Risk
HashiCorp · Cloud & Infra · BSL-1.1 · macos / linux / windows

HashiCorp Terraform (terraform) provisions multi-cloud infrastructure declaratively from HCL configurations, delivering exemplary automation primitives: -json machine output, -input=false, -no-color, mandatory plan previews, and terraform show -json / validate -json.

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install hashicorp/tap/terraform
CLI vs MCP Decision CLI Preferred vs MCP

terraform runs validate -json, plan -out, and show -json locally against repo HCL and state files with mature LLM familiarity.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

Supports -json across validate, plan, apply, show, and output, plus -input=false and -no-color.

  • Supports -json, -input=false, -no-color, and show -json
Trust & Safety 22 / 25

Two-phase plan -out + show -json + apply <plan> workflow prevents surprise replacements, though remote state files can contain plaintext secrets.

  • Saved plan artifacts guarantee apply matches reviewed diff
Setup & Portability 14 / 15

Single static Go binary across macOS, Linux, and Windows, though terraform init downloads provider binaries.

  • Single Go binary via brew install hashicorp/tap/terraform
Utility & Efficiency 14 / 15

De facto multi-cloud IaC standard with deep LLM pretraining accuracy.

  • Universal multi-cloud provider ecosystem
Maintenance & Lineage 8 / 10

Official hashicorp/terraform maintained actively, though 2023 switch to BSL-1.1 prompted the OpenTofu fork.

  • Official hashicorp/terraform under BSL-1.1
Docs & Verifiability 9 / 10

Exhaustive HashiCorp Developer CLI and provider documentation.

  • Complete docs at developer.hashicorp.com/terraform

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Stores registry tokens in ~/.terraform.d/credentials.tfrc.json or TF_TOKEN_*, while provider auth uses cloud env vars (AWS_*, GOOGLE_*, ARM_*).

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI binary is free under BSL-1.1 (HCP Terraform cloud features are tiered); provisioned infra incurs cloud billing.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Terraform Agent Rules
- ALWAYS pass `-input=false -no-color` (and `-json` where supported) to prevent hangs.
- Run `terraform validate -json` and `terraform plan -out=tfplan.bin` first; inspect `terraform show -json tfplan.bin` for `delete`/replacement actions.
- NEVER run `terraform apply -auto-approve` or `terraform destroy` without explicit human review.

Agent-Ready Command Recipes

Safe Read-Only Queries

Validate HCL syntax and provider config in JSON
terraform validate -json -no-color

Checks configuration validity locally and outputs structured diagnostics JSON.

Compute a saved plan and inspect it as JSON
terraform plan -input=false -no-color -out=tfplan.bin && terraform show -json tfplan.bin

Generates a non-interactive execution plan and prints full resource diffs in JSON.

Controlled Writes & Previews

Apply only a previously reviewed plan file
terraform apply -input=false -no-color -json tfplan.bin

Executes the exact reviewed tfplan.bin with streaming JSON events and zero unexpected drift.

Strengths for Agents

  • + Saved plan -out + show -json + apply <plan> gives gold-standard change verification.
  • + -input=false and -no-color guarantee clean, non-hanging automation runs.
  • + Massive provider ecosystem and deep LLM fluency.

Caveats & Pitfalls

  • ! BSL-1.1 license restricts embedding in competing SaaS/IaC products.
  • ! Terraform state (terraform show -json / terraform.tfstate) can expose sensitive attribute values in plaintext.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI