Skip to main content

Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See Getting Started on the Terraform connector page.

Retrieve the Native Webhook URL

StackOne generates a unique Native Webhook URL for this connection, which you paste into Terraform when creating the notification.

  • Copy the Native Webhook URL from the Linked Account.

Create the webhook notification in Terraform

Register the Native Webhook URL as a webhook Notification Configuration on each workspace you want events from.

1

Configure the webhook destination

Create a webhook notification on the workspace.

  • Open the workspace and go to Settings > Notifications.
  • Click Create a Notification.
  • Destination: choose Webhook
  • Notification Name: enter a name for the notification
  • Webhook URL: paste the Native Webhook URL from the Linked Account
Create a Notification form showing the Webhook destination, Notification Name, Webhook URL, and Token fields
2

Select the triggers and create the notification

Under Run Events, choose which triggers Terraform sends.

  • Choose All events, or choose Only certain events.
  • For Only certain events, pick the run triggers you want (Created, Planning, Needs attention, Applying, Completed, Errored).
  • If the workspace has Health Assessments enabled, health-assessment triggers are also available.
  • Click Create a notification.
Run Events trigger selection with Only certain events chosen

Available webhook events

The events below can be delivered to StackOne. Only the triggers you enable on the notification are sent. Health assessment events need Health Assessments enabled on the workspace.

  • Run Created (run:created): Fired when a run begins and enters the pending stage.
  • Run Planning (run:planning): Fired when a run acquires the lock and starts to execute.
  • Run Needs Attention (run:needs_attention): Fired when a plan has changes and requires user input.
  • Run Applying (run:applying): Fired when a run enters the apply stage.
  • Run Completed (run:completed): Fired when a run completes successfully.
  • Run Errored (run:errored): Fired when a run terminates early due to an error or cancellation.
  • Assessment Check Failure (assessment:check_failure): Fired when one or more continuous validation checks fail.
  • Assessment Drift Detected (assessment:drifted): Fired when configuration drift is detected for the first time.
  • Assessment Failed (assessment:failed): Fired when a health assessment fails to run.

Delivery format

Terraform sends a verification request when the notification is enabled or re-verified. No action is needed from you.

Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.