-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
support-app.tf
50 lines (36 loc) · 1.61 KB
/
support-app.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
###################################################
# Account Alias for Support App
###################################################
resource "awscc_supportapp_account_alias" "this" {
count = var.support_app.account_alias != null ? 1 : 0
account_alias = var.support_app.account_alias
}
###################################################
# Slack Workspace Authorization for Support App
###################################################
# INFO: Not supported attributes
# - `version_id`
resource "awscc_supportapp_slack_workspace_configuration" "this" {
for_each = var.support_app.slack_workspaces
team_id = each.value
}
###################################################
# Slack Workspace Authorization for Support App
###################################################
resource "awscc_supportapp_slack_channel_configuration" "this" {
for_each = {
for configuration in var.support_app.slack_channel_configurations :
configuration.name => configuration
}
channel_name = each.key
team_id = awscc_supportapp_slack_workspace_configuration.this[each.value.workspace].team_id
channel_id = each.value.channel
## Permissions
# TODO: Use default role with `permission` variable
channel_role_arn = each.value.channel_role
## Notification
notify_on_case_severity = lower(each.value.notification_case_severity)
notify_on_add_correspondence_to_case = each.value.notification_on_add_correspondence_to_case
notify_on_create_or_reopen_case = each.value.notification_on_create_or_reopen_case
notify_on_resolve_case = each.value.notification_on_resolve_case
}