cluster/nomad/regions/homelab-1/ingress.tf
Magic_RB 5ed9ee1903
Terraform: add flake_ref to allow for branches
Signed-off-by: Magic_RB <magic_rb@redalder.org>
2022-09-18 18:33:26 +02:00

18 lines
407 B
HCL

data "local_file" "ingress-upstreams" {
filename = "${path.module}/ingress-upstreams.conf"
}
resource "nomad_job" "ingress" {
jobspec = file("${path.module}/job/ingress.hcl")
hcl2 {
enabled = true
vars = {
flake_ref = "${var.flake_host}?rev=${var.flake_rev}&ref=${var.flake_ref}"
flake_sha = var.flake_sha
upstreams = data.local_file.ingress-upstreams.content
}
}
}