2023-05-03 21:16:47 +00:00
|
|
|
resource "nomad_job" "mysql-server" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/mysql.nomad")
|
|
|
|
|
|
|
|
# Block until deployed as there are servics dependent on this one
|
|
|
|
detach = false
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "postgres-server" {
|
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
jobspec = file("${path.module}/postgres.nomad")
|
|
|
|
|
|
|
|
# Block until deployed as there are servics dependent on this one
|
|
|
|
detach = false
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "nomad_job" "redis" {
|
2023-07-07 22:50:23 +00:00
|
|
|
for_each = toset(["blocky", "authelia"])
|
|
|
|
|
2023-05-03 21:16:47 +00:00
|
|
|
hcl2 {
|
|
|
|
enabled = true
|
|
|
|
}
|
|
|
|
|
2023-07-07 22:50:23 +00:00
|
|
|
jobspec = templatefile("${path.module}/redis.nomad",
|
|
|
|
{
|
|
|
|
name = each.key,
|
|
|
|
}
|
|
|
|
)
|
2023-05-03 21:16:47 +00:00
|
|
|
|
|
|
|
# Block until deployed as there are servics dependent on this one
|
|
|
|
detach = false
|
|
|
|
}
|
2023-08-24 20:49:49 +00:00
|
|
|
|
|
|
|
resource "nomad_job" "lldap" {
|
|
|
|
jobspec = templatefile("${path.module}/lldap.nomad", {
|
|
|
|
use_wesher = var.use_wesher,
|
|
|
|
})
|
|
|
|
|
|
|
|
depends_on = [resource.nomad_job.mysql-server]
|
|
|
|
|
|
|
|
# Block until deployed as there are servics dependent on this one
|
|
|
|
detach = false
|
|
|
|
}
|