Daily Terraform health digest, posted straight to Slack

By General Input

Every weekday morning, your platform team gets one short Slack message ranking Terraform runs that failed, need approval, or are still applying.

Integrations

  • HCP Terraform (Terraform Cloud)
  • Slack Bot

Type

Agentic Task

Categories

  • Engineering
  • Operations

Every weekday at 8:00am, put together a prioritized health digest of my organization's HCP Terraform (Terraform Cloud) infrastructure and post it to my platform team's infrastructure channel in Slack. The goal is one short, scannable message that surfaces only the runs that need a human to look at them.

Start by calling List Workspaces to pull every workspace in my Terraform organization. For each workspace, use List Workspace Runs with status filtering to gather the runs from the last 24 hours. Focus on the runs that need attention: failed runs (status errored), runs waiting for approval (status planned or awaiting confirmation), and runs that are still applying (status applying or otherwise not yet finished). You can lean on filter[status_group] (non_final, final, discardable) to narrow the list, and treat applied, planned_and_finished, discarded, and canceled as finished states that usually do not need to appear.

For anything that looks noteworthy, call Show Run to get the run's current status, the reason it stopped or is waiting, and its links. Use that detail to write a plain-language, one-line explanation of what each run is and why it matters, so a teammate who did not trigger it can understand the situation at a glance.

Group the results into three sections: Failed runs, Waiting for approval, and Still applying. Sort the digest so failures and stuck approvals sit at the top, since those are the most urgent. Skip any workspace that has nothing noteworthy so the message stays short. Include a direct link to each run so my team can jump straight to it in HCP Terraform (for example, https://app.terraform.io/app/<org>/workspaces/<workspace>/runs/<run-id>).

Post the finished digest as a single message to my infrastructure channel using the Slack Bot Send a Message action. Keep it clean and scannable: a short header, the three grouped sections, and one line per run with its workspace name, a plain-language summary, and the link. If nothing is noteworthy across every workspace, post a brief all-clear line instead so the team knows the check ran and everything is healthy. This workflow should only read from Terraform; never approve, cancel, or start a run.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them