-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02-staff.tf
76 lines (67 loc) · 2.59 KB
/
02-staff.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
# ---- STAFF ----
resource discord_category_channel staff {
name = "Staff"
server_id = discord_server.nlp.id
position = discord_category_channel.resources.position + 1
}
module "staff_permissions" {
# only Staff+ and bots are allowed to see staff channels
source = "./limited_channel_permissions"
server_id = discord_server.nlp.id
channel_id = discord_category_channel.staff.id
permissions = local.permissions.view_channel
allow_roles = [
discord_role.staff.id,
discord_role.admin.id,
discord_role.bots.id
]
}
# ==== channels ====
resource discord_text_channel staff_resources {
name = "staff-resources"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
sync_perms_with_category = true
lifecycle { ignore_changes = [position] }
}
resource discord_text_channel staff_general {
name = "staff-general"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
position = discord_text_channel.staff_resources.position + 1
sync_perms_with_category = true
}
resource discord_text_channel staff_bot {
name = "staff-bot"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
position = discord_text_channel.staff_general.position + 1
sync_perms_with_category = true
}
resource discord_text_channel staff_logs {
name = "staff-logs"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
position = discord_text_channel.staff_bot.position + 1
sync_perms_with_category = true
}
resource discord_text_channel staff_logs_verbose {
name = "staff-logs-verbose"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
position = discord_text_channel.staff_logs.position + 1
sync_perms_with_category = true
}
# staff-forum lives here but can't be modeled in terraform
resource discord_text_channel staff_voice_text {
name = "staff-voice-text"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
lifecycle { ignore_changes = [position] }
sync_perms_with_category = true
}
resource discord_voice_channel staff_voice {
name = "staff-nyah-chat"
server_id = discord_server.nlp.id
category = discord_category_channel.staff.id
}