pagerduty_user_contact_method

A contact method is a contact method for a PagerDuty user (email, phone or SMS).

Example Usage

resource "pagerduty_user" "example" {
  name  = "Earline Greenholt"
  email = "125.greenholt.earline@graham.name"
  teams = [pagerduty_team.example.id]
}

resource "pagerduty_user_contact_method" "email" {
  user_id = pagerduty_user.example.id
  type    = "email_contact_method"
  address = "foo@bar.com"
  label   = "Work"
}

resource "pagerduty_user_contact_method" "phone" {
  user_id      = pagerduty_user.example.id
  type         = "phone_contact_method"
  country_code = "+1"
  address      = "2025550199"
  label        = "Work"
}

resource "pagerduty_user_contact_method" "sms" {
  user_id      = pagerduty_user.example.id
  type         = "sms_contact_method"
  country_code = "+1"
  address      = "2025550199"
  label        = "Work"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Contact methods can be imported using the user_id and the id, e.g.

$ terraform import pagerduty_user_contact_method.main PLBP09X:PLBP09X