google_monitoring_notification_channel

A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.

To get more information about NotificationChannel, see:

Example Usage - Notification Channel Basic

data "google_monitoring_notification_channel" "basic" {
  display_name = "Test Notification Channel"
}

resource "google_monitoring_alert_policy" "alert_policy" {
  display_name = "My Alert Policy"
  notification_channels = [data.google_monitoring_notification_channel.basic.name]
  combiner     = "OR"
  conditions {
    display_name = "test condition"
    condition_threshold {
      filter     = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\""
      duration   = "60s"
      comparison = "COMPARISON_GT"
      aggregations {
        alignment_period   = "60s"
        per_series_aligner = "ALIGN_RATE"
      }
    }
  }
}

Argument Reference

The arguments of this data source act as filters for querying the available notification channels. The given filters must match exactly one notification channel whose data will be exported as attributes. The following arguments are supported:

One of the following fields must be specified:


Other optional fields include:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported: