cluster/nomad/regions/homelab-1/camptules.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

21 lines
407 B
HCL

resource "vault_policy" "camputules-policy" {
name = "camptules-policy"
policy = <<EOF
path "kv/data/camptules" {
capabilities = ["read"]
}
EOF
}
resource "nomad_job" "camptules" {
jobspec = file("${path.module}/job/camptules.hcl")
hcl2 {
enabled = true
vars = {
flake_ref = "${var.flake_host}?rev=${var.flake_rev}&ref=${var.flake_ref}"
flake_sha = var.flake_sha
}
}
}