tf-runtask

Fetch Terraform Cloud run task results and generate a tiered markdown report.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/hashi-demo-lab/terraform-agentic-workflows-demo09 --skill tf-runtask
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tf-runtask
Source: https://github.com/hashi-demo-lab/terraform-agentic-workflows-demo09/tree/main/.claude/skills/tf-runtask
Command: npx skills add https://github.com/hashi-demo-lab/terraform-agentic-workflows-demo09 --skill tf-runtask

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, jq, and includes scripts (resource) components.

What problem does it solve?

Retrieve and display Terraform Cloud/Enterprise run task results for a given run, enabling operators to inspect run task outcomes, checks, and stage statuses without manual API queries.

Core Features & Use Cases

  • Fetch run task stages, results, and outcomes from the Terraform Cloud/Enterprise API with efficient sideloading and per-task detail.
  • Present a structured markdown report with a Tiered view: Tier 1 summary, Tier 2 stage tables, Tier 3 outcomes, and optional outcome bodies for deeper insight.
  • Enrich run-context by fetching MCP run details to show run status, trigger source, Terraform version, timestamps, and plan/apply state.

Quick Start

Run the script with a Terraform Run ID or URL after setting TFE_TOKEN and (optionally) TFE_HOSTNAME.

Frequently Asked Questions about tf-runtask

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch Terraform Cloud run task results for a specific run ID?

You can fetch Terraform Cloud run task results by providing a Run ID or Run URL. The script queries the Terraform Cloud/Enterprise API and returns a structured markdown report with summaries, stage tables, and outcome details.

What are Terraform run task stages and how do I inspect their outcomes?

Terraform run task stages represent sequential checks during a run. You can inspect their outcomes by retrieving task results via the API, which surfaces stage statuses and specific pass or fail outcomes in a tiered markdown format.

Do I need to set environment variables to retrieve Terraform Enterprise run task results?

Yes, you need to set the TFE_TOKEN environment variable for authentication. You can also optionally set TFE_HOSTNAME if you are targeting a specific Terraform Enterprise instance.

How does this approach compare to manually querying the Terraform Cloud API for task outcomes?

Using a dedicated script with curl and jq automates the retrieval and formatting of run task outcomes. It provides a structured tiered markdown report and enriched run context, avoiding manual API query construction and response parsing.

What happens if a Terraform run has no stages or task outcomes to display?

The script gracefully handles cases with no stages or no outcomes by returning appropriate empty states. It also includes error handling for missing tokens, invalid run IDs, and API errors to ensure clear feedback.

Can I get Terraform run context like trigger source and Terraform version alongside task results?

Yes, the script enriches the report by fetching MCP run details. This adds run status, trigger source, Terraform version, timestamps, and plan or apply state alongside the run task outcomes.