pagerduty_user_contact_method

Use this data source to get information about a specific contact method of a PagerDuty user that you can use for other PagerDuty resources.

Example Usage

data "pagerduty_user" "me" {
  email = "me@example.com"
}

data "pagerduty_user_contact_method" "phone_push" {
  user_id = data.pagerduty_user.me.id
  type    = "push_notification_contact_method"
  label   = "iPhone (John)"
}

resource "pagerduty_user_notification_rule" "low_urgency_sms" {
  user_id                = data.pagerduty_user.me.id
  start_delay_in_minutes = 5
  urgency                = "high"

  contact_method = {
    type = "push_notification_contact_method"
    id   = data.pagerduty_user_contact_method.phone_push.id
  }
}

Argument Reference

The following arguments are supported:

Attributes Reference