No slash command · from terraform-plugin
Lists Terraform Cloud workspace runs filtered by status or date. Useful for reviewing run history, finding failed runs, or auditing infrastructure changes.
Ships in terraform-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
List and filter runs from Terraform Cloud workspaces with formatted output.
| Use this skill when... | Use a sibling instead when... |
|---|---|
| Listing recent runs for an arbitrary TFC workspace by ID | Inspecting a single known run ID for status (tfc-run-status) |
| Filtering runs by status, operation, or source across an org | Reading plan/apply log content for a run (tfc-run-logs) |
| Searching runs by commit SHA or VCS user | Analyzing structured plan JSON for resource changes (tfc-plan-json) |
| Auditing run history across many TFC workspaces | Listing runs for the known Forum Virium workspaces (tfc-workspace-runs) |
# TFE_TOKEN: user or team token.
# Keep it in a secret manager and inject it into the command that needs it
# instead of exporting it, e.g. `fnox exec --only TFE_TOKEN -- <cmd>` or `op run -- <cmd>`.
export TFE_ADDRESS="app.terraform.io" # Optional
#!/bin/bash
set -euo pipefail
TOKEN="${TFE_TOKEN:?TFE_TOKEN not set}"
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io}/api/v2"
WORKSPACE_ID="${1:?Usage: $0 <workspace-id> [limit]}"
LIMIT="${2:-10}"
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?page[size]=$LIMIT" | \
jq -r '.data[] | [
.id,
.attributes.status,
.attributes."created-at"[0:19],
(.attributes.message // "No message")[0:50]
] | @tsv' | \
column -t -s $'\t'
TOKEN="${TFE_TOKEN:?TFE_TOKEN not set}"
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io}/api/v2"
ORG="ForumViriumHelsinki"
WORKSPACE="infrastructure-gcp"
# Get workspace ID first
WS_ID=$(curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/organizations/$ORG/workspaces/$WORKSPACE" | \
jq -r '.data.id')
# List runs
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WS_ID/runs?page[size]=10" | \
jq -r '.data[] | "\(.id) | \(.attributes.status) | \(.attributes."created-at"[0:19]) | \(.attributes.message // "No message")"'
TOKEN="${TFE_TOKEN:?TFE_TOKEN not set}"
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io}/api/v2"
WORKSPACE_ID="ws-abc123"
# Filter by single status
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?filter[status]=errored" | \
jq -r '.data[] | "\(.id) | \(.attributes.status) | \(.attributes."created-at")"'
# Filter by multiple statuses
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?filter[status]=errored,canceled" | \
jq -r '.data[] | "\(.id) | \(.attributes.status)"'
# Non-final runs (in progress)
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?filter[status_group]=non_final"
# Final runs (completed)
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?filter[status_group]=final"
# Discardable runs
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?filter[status_group]=discardable"
By default, plan-only runs are excluded. To include them:
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?filter[operation]=plan_and_apply,plan_only,save_plan,refresh_only,destroy"
TOKEN="${TFE_TOKEN:?TFE_TOKEN not set}"
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io}/api/v2"
ORG="ForumViriumHelsinki"
# All runs in org (limited info, no total count)
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/organizations/$ORG/runs?page[size]=20" | \
jq -r '.data[] | "\(.id) | \(.attributes.status)"'
# Filter by workspace names
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/organizations/$ORG/runs?filter[workspace_names]=infrastructure-gcp,infrastructure-github"
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?page[size]=10&include=plan" | \
jq -r '
["RUN_ID", "STATUS", "ADD", "CHG", "DEL", "CREATED"],
(.data[] | [
.id,
.attributes.status,
(.relationships.plan.data.id as $pid |
(.included[] | select(.id == $pid) | .attributes."resource-additions" // 0)),
(.relationships.plan.data.id as $pid |
(.included[] | select(.id == $pid) | .attributes."resource-changes" // 0)),
(.relationships.plan.data.id as $pid |
(.included[] | select(.id == $pid) | .attributes."resource-destructions" // 0)),
.attributes."created-at"[0:19]
]) | @tsv' | column -t
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?page[size]=5" | \
jq '[.data[] | {
id: .id,
status: .attributes.status,
created: .attributes."created-at",
message: .attributes.message,
has_changes: .attributes."has-changes",
auto_apply: .attributes."auto-apply"
}]'
| Parameter | Description | Example Values |
|---|---|---|
filter[status] | Run status | applied, errored, planned, canceled |
filter[status_group] | Status group | non_final, final, discardable |
filter[operation] | Operation type | plan_and_apply, plan_only, destroy |
filter[source] | Run source | tfe-api, tfe-ui, tfe-configuration-version |
filter[timeframe] | Time period | 2024, year, month |
search[user] | VCS username | Username string |
search[commit] | Commit SHA | SHA string |
search[basic] | Combined search | Search term |
Final States: applied, planned_and_finished, discarded, errored, canceled, force_canceled, policy_soft_failed
Non-Final States: pending, planning, planned, cost_estimating, policy_checking, confirmed, applying, and others
# Page 2 with 20 items per page
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs?page[number]=2&page[size]=20"
# Check pagination info
curl -sf --header "Authorization: Bearer $TOKEN" \
"$BASE_URL/workspaces/$WORKSPACE_ID/runs" | \
jq '.meta.pagination'
The /runs endpoint has a special rate limit of 30 requests/minute (not 30/second like most endpoints). Plan accordingly when scripting.
tfc-run-logs: Get plan/apply logs for a runtfc-run-status: Quick status check for a runtfc-workspace-runs: Convenience wrapper for known workspacesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/infrastructure-terraformTerraform IaC: HCL, state management, modules, plan-apply workflows. Use when the user mentions Terraform, HCL, terraform plan/apply, tfstate, or IaC provisioning./tfc-plan-jsonTFC plan JSON download and analysis. Use when diffing resource changes, inspecting replacements, or feeding plan data downstream. Requires TFE_TOKEN./tfc-run-logsRetrieve plan and apply logs from Terraform Cloud runs. Use when debugging failed plans/applies or reviewing TFC run output. Requires TFE_TOKEN./tfc-run-statusTerraform Cloud run status with resource counts and actions. Use when polling a run, checking pass/fail, or seeing if it can be applied or canceled. Requires TFE_TOKEN./tfc-workspace-runsList TFC runs across known workspaces (github, sentry, gcp, onelogin, twingate). Use when checking TFC status or listing runs by workspace. Requires TFE_TOKEN.npx claudepluginhub laurigates/claude-plugins --plugin terraform-pluginOther plugins' skills for the same job