-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01-resources.tf
97 lines (86 loc) · 3.36 KB
/
01-resources.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
# ---- WELCOME ----
resource discord_text_channel welcome {
name = "welcome"
server_id = discord_server.nlp.id
sync_perms_with_category = false
lifecycle { ignore_changes = [position] }
}
resource discord_news_channel announcements {
name = "announcements"
server_id = discord_server.nlp.id
sync_perms_with_category = false
position = discord_text_channel.welcome.position + 1
}
# ---- RESOURCES ----
resource discord_category_channel resources {
name = "Resources"
server_id = discord_server.nlp.id
lifecycle { ignore_changes = [position] }
}
resource discord_text_channel character_creation {
name = "character-creation"
server_id = discord_server.nlp.id
category = discord_category_channel.resources.id
sync_perms_with_category = true
lifecycle { ignore_changes = [position] }
}
resource discord_text_channel getting_started {
name = "getting-started"
server_id = discord_server.nlp.id
category = discord_category_channel.resources.id
sync_perms_with_category = true
position = discord_text_channel.character_creation.position + 1
}
resource discord_text_channel rules_in_wild {
name = "wilderness-rules"
server_id = discord_server.nlp.id
category = discord_category_channel.resources.id
sync_perms_with_category = true
position = discord_text_channel.getting_started.position + 1
}
resource discord_text_channel rules_in_town {
name = "city-and-downtime-rules"
server_id = discord_server.nlp.id
category = discord_category_channel.resources.id
sync_perms_with_category = true
position = discord_text_channel.rules_in_wild.position + 1
}
resource discord_text_channel house_rules {
name = "house-rules"
server_id = discord_server.nlp.id
category = discord_category_channel.resources.id
sync_perms_with_category = true
position = discord_text_channel.rules_in_town.position + 1
}
# ---- PERMISSIONS ----
# only Staff are allowed to write in welcome
module "welcome_permissions" {
source = "./limited_channel_permissions"
server_id = discord_server.nlp.id
channel_id = discord_text_channel.welcome.id
permissions = local.permissions.resource_channel
allow_roles = [
discord_role.staff.id,
]
additional_allow = local.permissions.view_channel # but everyone is allowed to see resources
}
module "announcements_permissions" {
source = "./limited_channel_permissions"
server_id = discord_server.nlp.id
channel_id = discord_news_channel.announcements.id
permissions = local.permissions.resource_channel - local.permissions.add_reactions
allow_roles = [
discord_role.staff.id,
]
additional_allow = local.permissions.view_channel # but everyone is allowed to see resources
}
module "resources_permissions" {
# only Staff are allowed to write in resources
source = "./limited_channel_permissions"
server_id = discord_server.nlp.id
channel_id = discord_category_channel.resources.id
permissions = local.permissions.resource_channel
allow_roles = [
discord_role.staff.id,
]
}