Skip to main content
Manages where Kosli sends one type of notification that Kosli raises itself, such as API key expiry warnings. The configured targets replace the recipients Kosli would otherwise derive from what the notification is about.
An organization has at most one configuration per notification_type. Creating this resource replaces any configuration already set for that type (for example, through the Kosli UI). Destroying it removes the configuration, so Kosli derives the recipients again. Requires a service account with Admin permissions.
To read the current configuration and delivery status, use the kosli_notification_config data source.

Example usage

Notification types

Targets

Each target attribute takes one or more values. You must set at least one of them.
  • The provider sends every address in emails as a single email target.
  • The provider sends each URL in slack_webhooks or webhooks as its own target.
  • Kosli lowercases the host of webhook URLs and the domain of email addresses, and strips trailing slashes from URLs. When Kosli stores an equivalent value, the provider keeps the spelling from your configuration, so this normalization never shows up as a diff.
  • URL paths and email local parts are compared exactly.

Import

Notification configs can be imported using their notification type:

Schema

Required

  • notification_type (String) The type of notification to configure. Currently api_key_expiry (warnings that a service account API key is about to expire). Changing this will force recreation of the resource.

Optional

  • emails (Set of String) Email addresses the notification is sent to.
  • slack_webhooks (Set of String, Sensitive) Slack incoming webhook URLs the notification is posted to. Must use HTTPS.
  • webhooks (Set of String, Sensitive) Generic webhook URLs the notification is POSTed to as JSON (payload version 1.0). Must use HTTPS.
Last modified on October 5, 2026