Skip to content

intutic_notification_rule Cloud ​

A notification rule (/api/v1/notifications/rules): which event goes to which Slack channel, email addresses, webhook or PagerDuty service. Each channel needs its own target attribute. A webhook rule is always signed; its signing secret is generated by the API, returned once and kept in state as signing_secret; secret_rotation_triggers replaces it. Needs an OWNER or ADMIN key.

Example Usage ​

terraform
resource "intutic_notification_rule" "incidents_to_slack" {
  event_type         = "incident.created"
  channel            = "slack"
  slack_channel_name = "#agent-incidents"
  filter_severity    = ["critical", "high"]
}

resource "intutic_notification_rule" "incidents_to_pagerduty" {
  event_type            = "incident.created"
  channel               = "pagerduty"
  pagerduty_routing_key = var.pagerduty_routing_key
  filter_severity       = ["critical"]
  cooldown_minutes      = 60
}

variable "pagerduty_routing_key" {
  type      = string
  sensitive = true
}

# A webhook rule whose signing secret is replaced every 30 days. The receiver
# reads the new secret from the output after each apply.
resource "time_rotating" "webhook" {
  rotation_days = 30
}

resource "intutic_notification_rule" "incidents_to_webhook" {
  event_type  = "incident.created"
  channel     = "webhook"
  webhook_url = "https://hooks.example.com/intutic"

  secret_rotation_triggers = {
    rotated = time_rotating.webhook.id
  }
}

output "incident_webhook_signing_secret" {
  value     = intutic_notification_rule.incidents_to_webhook.signing_secret
  sensitive = true
}

Schema ​

Required ​

  • channel (String) One of slack, email, webhook, pagerduty.
  • event_type (String) The event that triggers the rule, for example incident.created.

Optional ​

  • cooldown_minutes (Number) Minimum minutes between notifications from this rule (1–1440). Defaults to 15.
  • email_recipients (List of String) For email: 1–20 addresses, one message each.
  • enabled (Boolean)
  • filter_harness_type (List of String) Only notify for events whose harness type is one of these.
  • filter_severity (List of String) Only notify for events whose severity is one of these.
  • filter_user_id (List of String) Only notify for events whose user id is one of these.
  • pagerduty_routing_key (String, Sensitive) For pagerduty: the integration's routing key. The API only ever returns it masked.
  • secret_rotation_triggers (Map of String) Arbitrary values that rotate the signing secret when they change. Changing, adding or removing any value replaces a webhook rule's signing secret in place on the next apply and stores the new one in signing_secret; the old secret stops working at once. Creating the resource does not rotate, since the API issues a secret then. Only for a webhook rule.
  • slack_channel_id (String) For slack: the channel id.
  • slack_channel_name (String) For slack: the channel name.
  • webhook_url (String) For webhook: an https URL on a public address.

Read-Only ​

  • id (String) The rule id (nr_…).
  • signing_secret (String, Sensitive) For webhook: the secret that signs each delivery. Generated when the rule becomes a webhook or secret_rotation_triggers changes; null after an import, since the API returns it only once.

Import ​

shell
# Import by rule id. Webhook signing secrets and PagerDuty routing keys are
# never returned after creation.
terraform import intutic_notification_rule.incidents_to_slack nr_0123456789abcdef

The circuit breaker for AI agents