Last updated: August 31, 2026
dash0_notification_channel
Manages a Dash0 Notification Channel. Notification channels define how alerts are delivered to external systems such as Slack, PagerDuty, email, and webhooks. Notification channels are organization-level resources and are not scoped to a dataset.
See Send Alert Check Notifications and Route Alert Check Notifications for more details.
Supported channel types: slack (webhook), slack_bot, email_v2, pagerduty, opsgenie, webhook, teams_webhook, discord_webhook, google_chat_webhook.
Example Usage
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184# Slack webhook notification channelresource "dash0_notification_channel" "slack_webhook" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Slack Alertsspec:type: slackconfig:webhookURL: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"channel: "#alerts"frequency: 10mYAML}# Slack Bot notification channel## Prerequisites:# 1. Install the Dash0 Slack App via the Dash0 UI (Settings > Notification# Channels > Add Notification Channel > Slack Bot > Authorize). This is a# one-time operation per Slack workspace.# 2. Invite the bot to the target channel: /invite @Dash0# 3. The Dash0 bot must be explicitly added to each Slack channel it will post to.# In Slack, open the target channel and run `/invite @Dash0`. Repeat this for every channel# you want to receive notifications in.resource "dash0_notification_channel" "slack_bot" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Slack Bot Alertsspec:type: slack_botconfig:teamId: "T012345"channel: "#alerts"frequency: 10mYAML}# Email notification channelresource "dash0_notification_channel" "email" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Email Alertsspec:type: email_v2config:recipients:- oncall@example.com- sre-team@example.complaintext: falsefrequency: 10mYAML}# PagerDuty notification channelresource "dash0_notification_channel" "pagerduty" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: PagerDuty Incidentsspec:type: pagerdutyconfig:key: "my-pagerduty-integration-key"url: "https://events.pagerduty.com/v2/enqueue"frequency: 10mYAML}# OpsGenie notification channelresource "dash0_notification_channel" "opsgenie" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Opsgenie Alertsspec:type: opsgenieconfig:apiKey: "my-opsgenie-api-key"instance: usfrequency: 10mYAML}# Generic webhook notification channelresource "dash0_notification_channel" "webhook" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Webhook Alertsspec:type: webhookconfig:url: "https://example.com/webhook/alerts"frequency: 10mYAML}# Microsoft Teams notification channelresource "dash0_notification_channel" "teams" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Microsoft Teams Alertsspec:type: teams_webhookconfig:url: "https://example.webhook.office.com/webhookb2/..."frequency: 10mYAML}# Discord notification channelresource "dash0_notification_channel" "discord" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Discord Alertsspec:type: discord_webhookconfig:url: "https://discord.com/api/webhooks/..."frequency: 10mYAML}# Google Chat notification channelresource "dash0_notification_channel" "google_chat" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Google Chat Alertsspec:type: google_chat_webhookconfig:url: "https://chat.googleapis.com/v1/spaces/.../messages?key=..."frequency: 10mYAML}# Webhook notification channel with routing rules## Routing rules control which alerts are delivered to this channel.# Each top-level list item is an OR group; conditions within a group are ANDed.# In this example, notifications are sent when:# (team.name = "sre" AND deployment.environment.name = "production")# OR (service.severity = "critical")## Note: `routing` also has an API-managed `assets` sibling — the Dash0 API populates it as a# back-reference when a check rule or synthetic check binds to the channel, and discards any# value supplied on write (the provider warns if you set it). Bind a check rule via its# `dash0.com/notification-channel-ids` annotation, or a synthetic check via its# `spec.notifications.channels`.resource "dash0_notification_channel" "webhook_with_routing" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Production Alerts (Webhook with Routing)spec:type: webhookconfig:url: "https://example.com/webhook/production-alerts"frequency: 5mrouting:filters:- - key: team.nameoperator: isvalue: sre- key: deployment.environment.nameoperator: isvalue: production- - key: service.severityoperator: isvalue: criticalYAML}# You can also load the YAML definition from a file:## resource "dash0_notification_channel" "from_file" {# notification_channel_yaml = file("${path.module}/notification_channel.yaml")# }
Notification Frequency
The frequency field in the notification channel spec controls how often reminder notifications are sent while an alert is firing.
Important behavior:
- If
frequencyis not specified in your YAML, the Dash0 API applies a default value of10m. This means you will receive reminder notifications every 10 minutes while the alert is active. - To disable reminder notifications (receive only the initial alert and resolution notification), explicitly set
frequency: 0s. - Removing
frequencyfrom an existing configuration will not disable reminders — it will reset to the default10m.
Example: disable reminders
12345678910111213resource "dash0_notification_channel" "no_reminders" {notification_channel_yaml = <<-YAMLkind: Dash0NotificationChannelmetadata:name: Alerts Without Remindersspec:type: slackconfig:webhookURL: "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"channel: "#alerts"frequency: 0sYAML}
In this configuration, you will receive a notification when the alert fires and another when it resolves, but no reminder notifications in between.
Schema
Required
notification_channel_yaml(String) The notification channel definition in YAML format. The YAML must includekind: Dash0NotificationChannel, ametadata.namefield, and aspecwithtypeand type-specificconfig. Optional fields includefrequency(controls reminder notification intervals; defaults to10mif omitted; set to0sto disable reminders) androutingfor filtering which alerts are delivered. Note thatspec.routing.assetsis populated by the Dash0 API as a back-reference when a check rule or synthetic check binds to this channel by id, and is discarded if supplied on write; bind a check rule by setting thedash0.com/notification-channel-idsannotation on the rule, or a synthetic check by settingspec.notifications.channelson the synthetic check. See Send Alert Check Notifications for the available options.
Read-Only
id(String) The server-assigned UUID of the notification channel, resolved by the provider after creation. Reference this value when wiring the channel into another resource's YAML — for example, in adash0_synthetic_check'sspec.notifications.channelslist, which requires raw UUIDs rather than origins.origin(String) A unique identifier for the notification channel, automatically generated on creation. Used to reference the notification channel for updates, reads, deletes, and imports.url(String) The URL to open this notification channel in the Dash0 web app, derived from the Dash0 API URL and the channel's server-assigned identifier. Computed by the provider after creation. May be empty if the app URL cannot be derived (e.g. for self-hosted deployments with a custom web app domain).
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
12#!/bin/bashterraform import dash0_notification_channel.name "{{ id_or_origin }}"