-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathlocals.tf
52 lines (43 loc) · 1.31 KB
/
locals.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
locals {
live_workspace = "live"
live_domain = "cloud-platform.service.justice.gov.uk"
ingress_redirect = terraform.workspace == local.live_workspace ? true : false
alertmanager_ingress = format(
"%s.%s",
"https://alertmanager",
var.cluster_domain_name,
)
grafana_ingress = format(
"%s.%s",
"grafana",
var.cluster_domain_name,
)
grafana_root = format(
"%s.%s",
"https://grafana",
var.cluster_domain_name,
)
prometheus_ingress = format(
"%s.%s",
"https://prometheus",
var.cluster_domain_name,
)
prometheus_dependency = helm_release.prometheus_operator_eks
prometheus_sa_name = "prometheus-operator-kube-p-prometheus"
ecr_exporter_sa = "ecr-exporter"
rds_exporter_sa = "rds-exporter"
subnet_exporter_sa = "subnet-exporter"
alertmanager_receivers = [
for receiver in var.alertmanager_slack_receivers : templatefile("${path.module}/templates/alertmanager_receivers.tpl", {
severity = receiver.severity
webhook = receiver.webhook
channel = receiver.channel
ingress = local.alertmanager_ingress
})
]
alertmanager_routes = [
for receiver in var.alertmanager_slack_receivers : templatefile("${path.module}/templates/alertmanager_routes.tpl", {
severity = receiver.severity
})
]
}