Skip to main content
The devhelm_alert_channel resource creates and manages alert channel integrations in Terraform.

Basic example

resource "devhelm_alert_channel" "slack" {
  name         = "Engineering Slack"
  channel_type = "slack"
  webhook_url  = var.slack_webhook_url
  mention_text = "@channel"
}

Arguments

AttributeTypeRequiredDescription
namestringYesChannel display name (also used as import ID)
channel_typestringYesslack, email, pagerduty, opsgenie, discord, teams, webhook
webhook_urlstringWebhook URL (required for slack, discord, teams)
mention_textstringSlack mention text (e.g., @channel)
mention_role_idstringDiscord role ID to mention
recipientslist(string)Email addresses (required for email)
routing_keystringPagerDuty Events API v2 routing key (sensitive)
severity_overridestringPagerDuty severity override
api_keystringOpsGenie API key (sensitive)
regionstringOpsGenie region (us or eu)
urlstringEndpoint URL (required for webhook)
custom_headersmap(string)Custom HTTP headers for webhook delivery
signing_secretstringHMAC signing secret for webhook payloads (sensitive)

Computed attributes

AttributeDescription
idChannel ID
config_hashContent hash of the channel configuration

Examples by type

resource "devhelm_alert_channel" "slack" {
  name         = "Slack Alerts"
  channel_type = "slack"
  webhook_url  = var.slack_webhook_url
  mention_text = "@here"
}

Import

terraform import devhelm_alert_channel.slack "Slack Alerts"
Import uses the channel name as the identifier.

Next steps

Monitors

Reference channels from monitor resources.

Integrations

Setup guides for each channel type.