-
Notifications
You must be signed in to change notification settings - Fork 12
/
schedules.tf
164 lines (159 loc) · 5.13 KB
/
schedules.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
PagerDuty Schedules (see users.tf)
Ref: https://www.terraform.io/docs/providers/pagerduty/r/schedule.html
*/
/*
Support: 24x5 Rota (Level 1) - 2 layers
*/
resource "pagerduty_schedule" "support_level_1" {
name = "Support All-Week Schedule (L1)"
time_zone = "Europe/London"
layer {
name = "Workday Rotation"
start = "2020-06-21T00:00:00+00:00"
rotation_virtual_start = "2020-06-21T07:00:00+00:00"
rotation_turn_length_seconds = 86400
users = [
pagerduty_user.catelyn_stark.id,
]
restriction {
type = "weekly_restriction"
start_day_of_week = 1
start_time_of_day = "09:00:00"
duration_seconds = 28800
}
restriction {
type = "weekly_restriction"
start_day_of_week = 2
start_time_of_day = "09:00:00"
duration_seconds = 28800
}
restriction {
type = "weekly_restriction"
start_day_of_week = 3
start_time_of_day = "09:00:00"
duration_seconds = 28800
}
restriction {
type = "weekly_restriction"
start_day_of_week = 4
start_time_of_day = "09:00:00"
duration_seconds = 28800
}
restriction {
type = "weekly_restriction"
start_day_of_week = 5
start_time_of_day = "09:00:00"
duration_seconds = 28800
}
}
layer {
name = "Nightshift Rotation"
start = "2020-06-21T00:00:00+00:00"
rotation_virtual_start = "2020-06-21T07:00:00+00:00"
rotation_turn_length_seconds = 86400
users = [
pagerduty_user.robb_stark.id,
]
restriction {
type = "weekly_restriction"
start_day_of_week = 1
start_time_of_day = "17:00:00"
duration_seconds = 57600
}
restriction {
type = "weekly_restriction"
start_day_of_week = 2
start_time_of_day = "17:00:00"
duration_seconds = 57600
}
restriction {
type = "weekly_restriction"
start_day_of_week = 3
start_time_of_day = "17:00:00"
duration_seconds = 57600
}
restriction {
type = "weekly_restriction"
start_day_of_week = 4
start_time_of_day = "17:00:00"
duration_seconds = 57600
}
restriction {
type = "weekly_restriction"
start_day_of_week = 5
start_time_of_day = "17:00:00"
duration_seconds = 57600
}
}
}
/*
Support: 8x7 Rota (Level 2)
*/
resource "pagerduty_schedule" "support_level_2" {
name = "Support All-Week Schedule (L2)"
time_zone = "Europe/London"
layer {
name = "Daily Rotation"
start = "2020-06-21T00:00:00+00:00"
rotation_virtual_start = "2020-06-21T07:00:00+00:00"
rotation_turn_length_seconds = 86400
users = [
pagerduty_user.arya_stark.id,
pagerduty_user.sansa_stark.id
]
restriction {
type = "daily_restriction"
start_time_of_day = "09:00:00"
duration_seconds = 28800
}
}
}
/*
Operations: 24x7
*/
resource "pagerduty_schedule" "operations_level_1" {
name = "Operations Schedule (L1)"
time_zone = "Europe/London"
layer {
name = "Weekly Rotation"
start = "2020-06-21T00:00:00+00:00"
rotation_virtual_start = "2020-06-21T07:00:00+01:00"
rotation_turn_length_seconds = 604800
users = [
pagerduty_user.cersei_lannister.id,
pagerduty_user.jamie_lannister.id
]
}
}
resource "pagerduty_schedule" "operations_level_2" {
name = "Operations Schedule (L2)"
time_zone = "Europe/London"
layer {
name = "Weekly Rotation"
start = "2020-06-21T00:00:00+00:00"
rotation_virtual_start = "2020-06-21T07:00:00+01:00"
rotation_turn_length_seconds = 604800
users = [
pagerduty_user.tyrion_lannister.id,
pagerduty_user.lancel_lannister.id
]
}
}
/*
IT Management: 24x7
*/
resource "pagerduty_schedule" "it_management" {
name = "IT Management Schedule"
time_zone = "Europe/London"
layer {
name = "Daily Rotation"
start = "2020-06-21T00:00:00+00:00"
rotation_virtual_start = "2020-06-21T07:00:00+01:00"
rotation_turn_length_seconds = 86400
users = [
pagerduty_user.daenerys_targaryen.id,
pagerduty_user.davos_seaworth.id
]
}
}