forked from giranm/pagerduty-terraform-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 1
/
user_notification_rules.tf
38 lines (35 loc) · 1.23 KB
/
user_notification_rules.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
/*
PagerDuty User Notification Rules
Ref: https://www.terraform.io/docs/providers/pagerduty/r/user_notification_rule.html
*/
/*
Single User Example: Support Responder Catelyn Stark
Various rules depending on incident urgency - high often requires immediate attention.
*/
resource "pagerduty_user_notification_rule" "catelyn_stark_phone_high_urgency" {
user_id = pagerduty_user.catelyn_stark.id
start_delay_in_minutes = 1
urgency = "high"
contact_method = {
type = "phone_contact_method"
id = pagerduty_user_contact_method.catelyn_stark_phone.id
}
}
resource "pagerduty_user_notification_rule" "catelyn_stark_sms_high_urgency" {
user_id = pagerduty_user.catelyn_stark.id
start_delay_in_minutes = 1
urgency = "high"
contact_method = {
type = "sms_contact_method"
id = pagerduty_user_contact_method.catelyn_stark_sms.id
}
}
resource "pagerduty_user_notification_rule" "catelyn_stark_email_low_urgency" {
user_id = pagerduty_user.catelyn_stark.id
start_delay_in_minutes = 5
urgency = "low"
contact_method = {
type = "email_contact_method"
id = pagerduty_user_contact_method.catelyn_stark_email.id
}
}