-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathload_balancer.tf
25 lines (24 loc) · 996 Bytes
/
load_balancer.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
module "load_balancer" {
source = "./modules/load-balancer"
enabled = var.nomad_load_balancer_enabled
region = var.region
name = "load-balancer"
ports = [4646,8501]
health_check_port = 4646
target_tags = ["server"]
network = module.network.name
instances = formatlist("${format("%s-%s/server", var.region, var.zone)}-%d", range(var.server_instances))
and_depends_on = [module.network]
}
module "grafana_load_balancer" {
source = "./modules/load-balancer"
enabled = var.grafana_load_balancer_enabled
region = var.region
name = "grafana-load-balancer"
ports = [3000]
health_check_port = 3000
target_tags = ["client"]
network = module.network.name
instances = formatlist("${format("%s-%s/client", var.region, var.zone)}-%d", range(var.client_instances))
and_depends_on = [module.network]
}