pagerduty_schedule

A schedule determines the time periods that users are on call. Only on-call users are eligible to receive notifications from incidents.

Example Usage

resource "pagerduty_user" "example" {
  name  = "Earline Greenholt"
  email = "125.greenholt.earline@graham.name"
}

resource "pagerduty_team" "example" {
  name = "A Team"
}

resource "pagerduty_schedule" "foo" {
  name      = "Daily Engineering Rotation"
  time_zone = "America/New_York"

  layer {
    name                         = "Night Shift"
    start                        = "2015-11-06T20:00:00-05:00"
    rotation_virtual_start       = "2015-11-06T20:00:00-05:00"
    rotation_turn_length_seconds = 86400
    users                        = [pagerduty_user.example.id]

    restriction {
      type              = "daily_restriction"
      start_time_of_day = "08:00:00"
      duration_seconds  = 32400
    }
  }

  teams = [pagerduty_team.example.id]
}

Argument Reference

The following arguments are supported:

Schedule layers (layer) supports the following:

Restriction blocks (restriction) supports the following:

Attributes Reference

The following attributes are exported:

Import

Schedules can be imported using the id, e.g.

$ terraform import pagerduty_schedule.main PLBP09X