Track every Terraform run in Slack and a spreadsheet

Automatically announce every new Terraform run in your deploys channel and log it to a spreadsheet, so anyone can see what changed and when.

Deterministic Code
HCP Terraform (Terraform Cloud)Slack BotGoogle SheetsEngineeringOperationsNotifications & AlertsData Sync
PromptCreate

Whenever a new run is queued on one of my HCP Terraform (Terraform Cloud) workspaces, keep a running audit trail of the infrastructure change. Use the poll trigger for a new run on a workspace so this workflow fires each time a run is queued.

For each new run, read the run with the HCP Terraform Show Run action to pull the details I care about: the workspace name, the run id, what kicked off the run (the trigger source or who created it), the run message, the timestamp it was created, and a link to the run in HCP Terraform.

Then do two deterministic things. First, post a short announcement to our deploys channel using the Slack Bot Send a Message action. Keep it brief and fixed: the workspace name, the run message, what triggered it, and the link to the run.

Second, append one row to a Google Sheet using the Append Values action. Log the workspace name, run id, trigger source, run message, and a link to the run, one field per column, in the same order every time.

Keep the format fixed at exactly one row per run with no interpretation or summarization. The goal is a clean, searchable change history that non-engineers can read, not a summary.

Additional information

What does this prompt do?
  • Watches your HCP Terraform workspaces and reacts the moment a new run is queued
  • Posts a short announcement to your deploys channel in Slack with the key details and a link to the run
  • Appends one row per run to a Google Sheet, building a searchable history of infrastructure changes
  • Keeps the format fixed and consistent so non-engineers can read the change log at a glance
What do I need to use this?
  • An HCP Terraform (Terraform Cloud) account with the workspaces you want to watch
  • A Slack workspace and a channel for deploy announcements
  • A Google account with a spreadsheet to store the change history
How can I customize it?
  • Choose which Slack channel receives the announcements
  • Point it at the exact Google Sheet and tab where the log should live
  • Adjust which details appear in the announcement and the logged row, such as workspace, run message, who triggered it, and the link

Frequently asked questions

What counts as a Terraform run?
A run is any planned or applied change to your infrastructure in HCP Terraform. Every time a new one is queued, this workflow records it.
Will non-engineers be able to understand the log?
Yes. The spreadsheet keeps one plain row per run with the workspace, what triggered it, the run message, and a link, so anyone can scan the history without technical knowledge.
Does it change or summarize the information?
No. It records the same fixed fields every time with no interpretation, so the log stays consistent and easy to trust.
Can I send announcements to a specific channel?
Yes. It posts to one deploys channel by default, and you can choose exactly which channel it uses when you set it up.
How quickly does it react to a new run?
It checks your workspaces for new runs automatically and records each one shortly after it is queued.

Keep a change log of every infrastructure change.

Set up automatic Terraform run tracking in Slack and Google Sheets in minutes.