Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By laurigatesv1.8.0MITIn 1 marketplace
Checks Terraform Cloud run status and fetches plan and apply logs from the TFC API to debug failed runs. Needs a Terraform Cloud API token; a Bash hook blocks terraform apply unless it applies a saved plan file.
Trending plugins
7-day copy clicks
Claude hands work to one, or you mention it with @.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
terraform-cloud, infrastructure-as-code, tfc, plan-json, terraform-logs, run-status, iac
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Terraform Cloud (TFC) automation for infrastructure management - list runs, check status, fetch logs, and analyze plan JSON output.
This plugin provides comprehensive Terraform Cloud API automation for monitoring and analyzing infrastructure runs, plans, and applies. Work with TFC workspaces, retrieve logs, analyze plan changes, and track run status directly from Claude Code.
| Skill | Description |
|---|---|
tfc-run-logs | Retrieve plan and apply logs from Terraform Cloud runs |
tfc-workspace-runs | Convenience wrapper for listing runs in configured workspaces |
tfc-list-runs | List and filter runs from Terraform Cloud workspaces |
tfc-run-status | Quick status check for TFC runs with resource changes and actions |
tfc-plan-json | Download and analyze structured Terraform plan JSON output |
validate-terraform-apply.sh is a PreToolUse hook on the Bash tool that gates
an unreviewed apply.
| Command | Verdict |
|---|---|
terraform apply | Blocked — nothing was reviewed |
terraform apply -auto-approve, including the quoted spellings and alongside a plan file | Blocked |
terraform apply -refresh=false, terraform apply 2>&1 | tee log | Blocked — no plan file anywhere in the command |
timeout 300 terraform apply, env -i terraform apply, for d in …; do terraform apply; done | Blocked — the wrapper and the loop keyword do not hide the program |
terraform apply tfplan | Allowed — applies exactly the saved plan |
| A quoted argument, heredoc body, or comment carrying the phrase | Allowed |
bash -c "terraform apply", echo "$(terraform apply)" | Blocked — that text is shell, not data |
The hook decides command position with ast-grep --lang bash
(tree-sitter-bash), the classifier hooks-plugin/hooks/bash-antipatterns.sh
adopted in #2008. Each command node of the Bash call is examined on its own,
so a heredoc body is never a command, a redirection's fd digit is never an
argument, a do/then keyword is never glued to the program name, and any
wrapper — sudo, timeout, nice, stdbuf, xargs, uv run — is just the
front of the same node. A PR body or search query quoting terraform apply
executes nothing and is not gated (#2506). The one thing tree-sitter cannot see
into is a shell invoker's script argument, so bash -c "…", sh -c '…' and
eval "…" have their quoted arguments re-parsed as shell.
A program name assembled from an expansion — A='terraform apply -auto-approve'; $A — carries no terraform token and is not caught. Neither
the pre-#2506 regex nor any later version caught it; the gate stops the
unreviewed apply written by habit, not one written to evade it.
Where ast-grep is not installed the hook does not fire at all. It fails
open, exactly as bash-antipatterns.sh does, because a PreToolUse hook that
hard-fails without its parser breaks every Bash call. Install ast-grep (brew install ast-grep, cargo install ast-grep) for the gate to be in effect.
Quotes are removed rather than masked, because the shell removes them: terraform apply "-auto-approve" really delivers -auto-approve to the process, and is
blocked. A plan file is a positional operand carrying no =, not consumed as a
preceding bare flag's value (so -var foo=bar and -target aws_x.y do not
count as one), and named literally — a $VAR, $(…) or backtick operand
cannot be resolved here, could expand to -auto-approve, and is treated as an
unreviewed apply.
terraform-lock-pipe-guard.sh is a second PreToolUse hook on the Bash tool
(#3849). plan, apply, destroy, refresh, import and the writing state
subcommands hold the remote backend lock for their whole run. A reader that
exits early closes the pipe, SIGPIPE kills tofu/terraform mid-run, and the lock
is left behind until a manual force-unlock. Until then it blocks every later
plan and CI apply.
| Command | Verdict |
|---|---|
tofu plan | head -20, cd infra && terraform plan 2>&1 | grep -m1 Plan, tofu plan | sed 30q, tofu plan | tee log | grep -q x | Blocked: the message prescribes mkdir -p tmp && <stage> > tmp/tf-<subcommand>.txt 2>&1, then Read |
just plan | head, make plan | head, mise run tf:plan | head, terragrunt plan | head | Nudge (exit 0 with additionalContext): the hook cannot see the recipe body |
tofu plan > tmp/plan.txt 2>&1 && head tmp/plan.txt | Allowed: tofu is not in the pipe |
tofu plan | tail, tofu plan | grep Plan, tofu plan | tee log | Allowed: the reader consumes all input |
tofu plan -lock=false | head, tofu state list | head, tofu validate | head | Allowed: no lock is taken |
The phrase quoted in a PR body, echo, or heredoc | Allowed |
7-day copy clicks
npx claudepluginhub laurigates/claude-plugins --plugin terraform-pluginBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground