Skip to main content

Terraform

20 tools wrapping the local terraform CLI — the full lifecycle, state management, and a GitHub-integrated CI hook. Implemented in tools/terraformOps.js.

Setup

Install the Terraform CLI and make sure terraform is on your PATH. No API key required — these tools shell out to the CLI directly.

Core lifecycle (9 tools)

ToolRiskWhat it does
terraform_initLOWInitialize a working directory, download providers
terraform_validateREADValidate config syntax and internal consistency
terraform_fmtLOWFormat .tf files to canonical style
terraform_planREADShow what would change
terraform_applyDESTRUCTIVEApply changes to reach the desired state
terraform_destroyDESTRUCTIVEDestroy all resources managed by the config
terraform_showREADShow current state or a saved plan
terraform_outputREADRead output values from state
terraform_workspaceMEDIUMManage workspaces (dev/staging/prod) — list/new/select/delete

State & advanced (10 tools)

ToolRiskWhat it does
terraform_state_listREADList resources tracked in state
terraform_state_showREADShow a single resource's attributes
terraform_state_mvHIGHMove a resource to a new state address
terraform_state_rmHIGHStop tracking a resource, without destroying it
terraform_state_pullREADDownload raw remote state as JSON
terraform_importHIGHBring an existing real-world resource under management
terraform_taintHIGHForce a resource to be destroyed and recreated next apply
terraform_untaintLOWRemove a resource's tainted mark
terraform_graphREADGenerate a dependency graph (DOT format)
terraform_providersREADList required providers and resolved versions

CI/CD hook (1 tool)

terraform_plan_comment (HIGH) — runs terraform plan, formats a Markdown summary, and posts it as a comment on a GitHub pull request (via the same GitHub tooling used elsewhere in this server) — so a reviewer sees the infrastructure diff before approving, without leaving the PR.

Example

"Run a plan against ./infra/staging and post the result as a comment on PR #42."

Claude calls terraform_plan_comment with dir, owner, repo, and pull_number — no manual copy-pasting plan output into GitHub.