github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/pagerduty/r/schedule.html.markdown (about)

     1  ---
     2  layout: "pagerduty"
     3  page_title: "PagerDuty: pagerduty_schedule"
     4  sidebar_current: "docs-pagerduty-resource-schedule"
     5  description: |-
     6    Creates and manages a schedule in PagerDuty.
     7  ---
     8  
     9  # pagerduty\_schedule
    10  
    11  A [schedule](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Schedules/get_schedules) determines the time periods that users are on call. Only on-call users are eligible to receive notifications from incidents.
    12  
    13  
    14  ## Example Usage
    15  
    16  ```hcl
    17  resource "pagerduty_user" "example" {
    18    name  = "Earline Greenholt"
    19    email = "125.greenholt.earline@graham.name"
    20    teams = ["${pagerduty_team.example.id}"]
    21  }
    22  
    23  resource "pagerduty_schedule" "foo" {
    24    name      = "Daily Engineering Rotation"
    25    time_zone = "America/New_York"
    26  
    27    layer {
    28      name                         = "Night Shift"
    29      start                        = "2015-11-06T20:00:00-05:00"
    30      rotation_virtual_start       = "2015-11-06T20:00:00-05:00"
    31      rotation_turn_length_seconds = 86400
    32      users                        = ["${pagerduty_user.foo.id}"]
    33  
    34      restriction {
    35        type              = "daily_restriction"
    36        start_time_of_day = "08:00:00"
    37        duration_seconds  = 32400
    38      }
    39    }
    40  }
    41  ```
    42  
    43  ## Argument Reference
    44  
    45  The following arguments are supported:
    46  
    47  * `name` - (Optional) The name of the escalation policy.
    48  * `time_zone` - (Required) The time zone of the schedule (e.g Europe/Berlin).
    49  * `description` - (Optional) The description of the schedule
    50  * `layer` - (Required) A schedule layer block. Schedule layers documented below.
    51  
    52  
    53  Schedule layers (`layer`) supports the following:
    54  
    55  * `name` - (Optional) The name of the schedule layer.
    56  * `start` - (Required) The start time of the schedule layer.
    57  * `end` - (Optional) The end time of the schedule layer. If not specified, the layer does not end.
    58  * `rotation_virtual_start` - (Required) The effective start time of the schedule layer. This can be before the start time of the schedule.
    59  * `rotation_turn_length_seconds` - (Required) The duration of each on-call shift in `seconds`.
    60  * `users` - (Required) The ordered list of users on this layer. The position of the user on the list determines their order in the layer.
    61  * `restriction` - (Optional) A schedule layer restriction block. Restriction blocks documented below.
    62  
    63  
    64  Restriction blocks (`restriction`) supports the following:
    65  
    66  * `type` - (Required) Can be `daily_restriction` or `weekly_restriction`
    67  * `start_time_of_day` - (Required) The start time in `HH:mm:ss` format.
    68  * `duration_seconds` - (Required) The duration of the restriction in `seconds`.
    69  
    70  ## Attributes Reference
    71  
    72  The following attributes are exported:
    73  
    74    * `id` - The ID of the schedule
    75  
    76  ## Import
    77  
    78  Schedules can be imported using the `id`, e.g.
    79  
    80  ```
    81  $ terraform import pagerduty_schedule.main PLBP09X
    82  ```