Instantly triage failed Terraform runs in Slack and Jira

When an HCP Terraform run fails, we instantly explain what broke in your infrastructure Slack channel and open a Jira bug for the platform team to fix.

Agentic Task
HCP Terraform (Terraform Cloud)Slack BotJiraEngineeringNotifications & Alerts
PromptCreate

Trigger this workflow from an HCP Terraform run notification webhook. In HCP Terraform, open each workspace you want to monitor, go to Settings then Notifications, add a notification configuration of type Webhook that points at this workflow's webhook URL, and scope it to the run errored / failed events. Terraform will then POST to this workflow whenever a run in that workspace errors.

When a webhook arrives, read the run ID and the run status from the notification payload. Only continue for genuine plan or apply failures (an errored run). If the run was user-canceled, force-canceled, or discarded, stop without posting to Slack or opening a Jira ticket, so we do not create noise for runs that never really failed.

Call Show Run on the run to confirm its status and collect the links to its plan and apply. Then call Get Plan JSON Output to read what the plan attempted to change.

Using the run status and the plan, diagnose the most likely cause of the failure and describe it in plain language a teammate can act on, for example a provider authentication error, a missing or invalid variable, a resource that already exists, or a dependency or timeout during apply. Keep it to a short, specific summary rather than a raw log dump.

Post an alert to our infrastructure Slack channel using the Slack Bot Send a Message action. Include the workspace name, the run status, your plain-language diagnosis of the most likely cause, and the links to the run's plan and apply so the team can jump straight to the details.

Open a Jira issue with Create Issue that captures the workspace, a concise summary of the error, and links back to the run. Set the issue type to Bug and assign it to the platform team so the failure is owned and tracked to resolution.

What does this prompt do?

  • Watches your HCP Terraform workspaces and springs into action the moment a run fails.
  • Reads the failed run and its plan, then writes a plain-language explanation of the most likely cause.
  • Posts an alert to your infrastructure Slack channel with the workspace, a summary, and links straight to the run.
  • Opens a Jira bug assigned to the platform team so the failure is tracked, while skipping runs that were simply canceled or discarded.

What do I need to use this?

  • An HCP Terraform (Terraform Cloud) account with the workspaces you want to monitor.
  • A Slack workspace and the channel where failure alerts should land.
  • A Jira project where new bug tickets should be created.
  • A few minutes to add a Terraform notification that points at this workflow and fires on failed runs.

How can I customize it?

  • Change which Slack channel receives the failure alerts.
  • Point the tickets at a different Jira project, team, or issue type.
  • Adjust which run outcomes count as a real failure worth a ticket versus noise to ignore.

FAQs

Will this create a ticket every time someone cancels a run?
No. It only opens a Jira ticket for genuine plan or apply failures, so canceled or discarded runs are ignored and your board stays clean.
How fast does the alert arrive?
It runs the moment Terraform sends the failure notification, so the Slack message and Jira ticket appear within seconds of a run erroring.
What goes into the Slack alert?
The workspace name, a plain-language explanation of the likely cause, the run's status, and direct links to the plan and apply so anyone can jump straight in.
Do I need to write any code?
No. You connect your Terraform, Slack, and Jira accounts and add one Terraform notification pointing at the workflow, and it handles the rest.
Can I send alerts to a different team?
Yes. You can change the Slack channel and the Jira project or assignee so the right team always gets the failure.

Related templates

A brand asset library your marketing team actually searches

Every logo, photo, video cut and ad export in one searchable grid, with previews, campaign tags and rights expiry dates at a glance.

General Input Storage
General Input Database
JigsawStack
+1
App
Turn Mailjet email clicks into ranked HubSpot follow-ups

Twice a day we spot the people clicking your pricing and demo pages, create a follow-up task for their owner, and post a ranked recap to Slack.

Mailjet
HubSpot
Slack Bot
Agentic Task
Clean out the Looker dashboards and Looks nobody opens

One board showing every dashboard and Look with its folder, owner and favorite count, so you can find dead content and retire it safely.

Looker
Slack Bot
App
LiveKit live operations console for room moderation

Watch every live room on one screen, remove disruptive guests, start recordings and end stuck sessions without anyone opening a terminal.

LiveKit
Slack Bot
General Input Database
App
Wake up dormant Keap leads with a researched reason

Every Monday we find leads who never bought, research a real reason to reach out, and send a short personal email instead of another check in.

Keap
Slack Bot
Agentic Task
LiveChat coverage board for planning next week's shifts

See the exact hours your chat queue backs up and customers give up waiting, then plan next week's shifts before it happens again.

LiveChat
Slack Bot
General Input Database
App

Stop hunting down failed Terraform runs.

Get an instant, plain-language explanation in Slack and a tracked Jira ticket every time a run fails.