51 lines
863 B
HCL
51 lines
863 B
HCL
module "databases" {
|
|
source = "./databases"
|
|
}
|
|
|
|
module "blocky" {
|
|
source = "./blocky"
|
|
|
|
base_hostname = var.base_hostname
|
|
depends_on = [module.databases]
|
|
}
|
|
|
|
module "traefik" {
|
|
source = "./traefik"
|
|
|
|
consul_address = var.consul_address
|
|
base_hostname = var.base_hostname
|
|
}
|
|
|
|
module "metrics" {
|
|
source = "./metrics"
|
|
|
|
consul_address = var.consul_address
|
|
}
|
|
|
|
module "loki" {
|
|
source = "./levant"
|
|
|
|
template_path = "service.nomad"
|
|
variables = {
|
|
name = "loki"
|
|
image = "grafana/loki:2.2.1"
|
|
service_port = 3100
|
|
ingress = true
|
|
sticky_disk = true
|
|
templates = jsonencode([
|
|
{
|
|
data = file("./loki-config.yml")
|
|
dest = "/etc/loki/local-config.yaml"
|
|
}
|
|
])
|
|
}
|
|
}
|
|
|
|
resource "nomad_job" "syslog-ng" {
|
|
hcl2 {
|
|
enabled = true
|
|
}
|
|
|
|
jobspec = file("${path.module}/syslogng.nomad")
|
|
}
|