Skip to content

Terraform plugin for infrastructure work

  • Date: 2026-04-21
  • Status: Accepted
  • Tags: tooling

Context

Infrastructure work on the Twenty/DevOps stack requires frequent Terraform operations — linting HCL, previewing plans, and inspecting state. Switching between Claude Code and a separate terminal for these operations breaks flow, especially during iterative infrastructure changes in the trusty_terraform repo.

Decision

Install the official Terraform plugin from claude-plugins-official on the work laptop. It provides HCL linting, plan preview, and state inspection as native Claude Code tools.

Alternatives Considered

Option Why Rejected
Raw terraform CLI via Bash tool Works but no inline linting or structured output
Terraform Language Server (LSP) only Provides linting but not plan/state integration
Custom MCP server wrapping Terraform CLI Too much maintenance for something an official plugin handles

Consequences

Positive:

  • HCL issues caught before terraform plan
  • Plan diffs and state queries available inline without terminal switching
  • Official plugin — maintained alongside Claude Code releases

Negative / Trade-offs:

  • Requires Terraform CLI and credentials configured on the work laptop
  • Plugin may not support all Terraform providers equally

Ongoing obligations:

  • ✅ Validated 2026-04-21 — mcp__plugin_terraform_terraform__* tools confirmed active; registry lookups, workspace queries, and run management functional
  • Terraform credentials and HCP Terraform token confirmed available in plugin context