-
Notifications
You must be signed in to change notification settings - Fork 0
/
teams.tf
62 lines (55 loc) · 1.63 KB
/
teams.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
resource "pagerduty_team" "helpdesk" {
name = "the help desk of ACME inc"
description = "Product and Engineering"
}
resource "pagerduty_team" "helpdesk_team_a" {
name = "Help Desk team A"
description = "Help Desk team A"
parent = pagerduty_team.helpdesk.id
}
resource "pagerduty_team" "helpdesk_team_b" {
name = "Help Desk team B"
description = "Help Desk team B"
parent = pagerduty_team.helpdesk.id
}
resource "pagerduty_team" "it_crm" {
name = "IT CRM"
description = "IT CRM"
}
resource "pagerduty_team" "IT" {
name = "IT"
description = "IT"
}
#######################
# User - Team Mapping #
#######################
resource "pagerduty_team_membership" "team_helpdesk_user_01" {
user_id = pagerduty_user.helpdesk_user01.id
team_id = pagerduty_team.helpdesk_team_a.id
role = "responder"
}
resource "pagerduty_team_membership" "team_helpdesk_user_02" {
user_id = pagerduty_user.helpdesk_user02.id
team_id = pagerduty_team.helpdesk_team_a.id
role = "responder"
}
resource "pagerduty_team_membership" "team_helpdesk_user_03" {
user_id = pagerduty_user.helpdesk_user03.id
team_id = pagerduty_team.helpdesk_team_b.id
role = "responder"
}
resource "pagerduty_team_membership" "team_helpdesk_user_04" {
user_id = pagerduty_user.helpdesk_user04.id
team_id = pagerduty_team.helpdesk_team_b.id
role = "responder"
}
resource "pagerduty_team_membership" "team_it_user_01" {
user_id = pagerduty_user.it_user01.id
team_id = pagerduty_team.it_crm.id
role = "responder"
}
resource "pagerduty_team_membership" "team_it_user_02" {
user_id = pagerduty_user.it_user02.id
team_id = pagerduty_team.it_crm.id
role = "responder"
}