Skip to main content
tfc-list-runs List Terraform Cloud workspace runs filtered by status or date. Use when reviewing run history, finding failed runs, or auditing infra changes. Requires TFE_TOKEN.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/laurigates/claude-plugins --skill tfc-list-runs命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... 同仓库更多 Skills Install, configure and troubleshoot MCP servers. Use when adding/enabling servers, editing .mcp.json, fixing OAuth, or when a server runs stale code after an upstream fix.
FinOps snapshot — org billing, workflow stats, cache usage. Use when you want a high-level view of CI spending or workflow health before diving deeper.
GitHub Actions billing, workflow efficiency, and waste analysis at org or repo level. Use when investigating CI/CD costs, wasted runs, or optimizing triggers.
created "2025-12-16T00:00:00.000Z" modified "2026-04-25T00:00:00.000Z" reviewed "2026-04-25T00:00:00.000Z" name tfc-list-runs description List Terraform Cloud workspace runs filtered by status or date. Use when reviewing run history, finding failed runs, or auditing infra changes. Requires TFE_TOKEN. user-invocable false allowed-tools Bash, Read
Terraform Cloud List Runs
List and filter runs from Terraform Cloud workspaces with formatted output.
When to Use This Skill
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)
Prerequisites export TFE_TOKEN="your-api-token"
export TFE_ADDRESS="app.terraform.io"
Core Commands
List Recent Runs for a Workspace #!/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'
List Runs by Workspace Name (requires org) TOKEN="${TFE_TOKEN:?TFE_TOKEN not set} "
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io} /api/v2"
ORG="ForumViriumHelsinki"
WORKSPACE="infrastructure-gcp"
WS_ID=$(curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /organizations/$ORG /workspaces/$WORKSPACE " | \
jq -r '.data.id' )
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")"'
Filter by Status TOKEN="${TFE_TOKEN:?TFE_TOKEN not set} "
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io} /api/v2"
WORKSPACE_ID="ws-abc123"
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs?filter[status]=errored" | \
jq -r '.data[] | "\(.id) | \(.attributes.status) | \(.attributes."created-at")"'
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs?filter[status]=errored,canceled" | \
jq -r '.data[] | "\(.id) | \(.attributes.status)"'
Filter by Status Group
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs?filter[status_group]=non_final"
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs?filter[status_group]=final"
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs?filter[status_group]=discardable"
Include Plan-Only Runs 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"
List Runs Across Organization TOKEN="${TFE_TOKEN:?TFE_TOKEN not set} "
BASE_URL="https://${TFE_ADDRESS:-app.terraform.io} /api/v2"
ORG="ForumViriumHelsinki"
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /organizations/$ORG /runs?page[size]=20" | \
jq -r '.data[] | "\(.id) | \(.attributes.status)"'
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /organizations/$ORG /runs?filter[workspace_names]=infrastructure-gcp,infrastructure-github"
Formatted Output Examples
Table Format with Resource Changes 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
JSON Output for Further Processing 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"
}]'
Available Filter Parameters Parameter Description Example Values filter[status]Run status applied, errored, planned, canceledfilter[status_group]Status group non_final, final, discardablefilter[operation]Operation type plan_and_apply, plan_only, destroyfilter[source]Run source tfe-api, tfe-ui, tfe-configuration-versionfilter[timeframe]Time period 2024, year, monthsearch[user]VCS username Username string search[commit]Commit SHA SHA string search[basic]Combined search Search term
Run Statuses 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
Pagination
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs?page[number]=2&page[size]=20"
curl -sf --header "Authorization: Bearer $TOKEN " \
"$BASE_URL /workspaces/$WORKSPACE_ID /runs" | \
jq '.meta.pagination'
Rate Limiting The /runs endpoint has a special rate limit of 30 requests/minute (not 30/second like most endpoints). Plan accordingly when scripting.
See Also
tfc-run-logs: Get plan/apply logs for a run
tfc-run-status: Quick status check for a run
tfc-workspace-runs: Convenience wrapper for known workspaces