-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocals.tf
31 lines (28 loc) · 1.2 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
locals {
kubeconfig_filename = abspath(pathexpand(var.kubeconfig_filename))
api_endpoint = var.api_endpoint
token = var.kubeconfig_client_token
certificate_authority_data = var.kubeconfig_cluster_certificate_authority_data
client_certificate_data = var.kubeconfig_client_certificate_data
client_key_data = var.kubeconfig_client_key_data
suffix = random_string.suffix.result
secret = random_string.secret.result
modules_result = {
for name, config in merge(var.modules, local.modules) : name => merge(config, {
output : config.enabled ? lookup(local.register_modules, name, try(config.output, tomap({}))) : tomap({})
})
}
manifests_template_vars = merge(
var.manifests_template_vars,
{
cluster_provider : var.cluster_provider
alertmanager_cronitor_id : var.cronitor_id
alertmanager_opsgenie_integration_api_key : var.opsgenie_integration_api_key
secret : random_string.secret.result
suffix : random_string.suffix.result
modules : local.modules_result
},
module.teleport-agent.teleport_agent_config,
{ for k, v in var.manifests_template_vars : k => v if k != "modules" }
)
}