homelab-nomad/core/blocky/blocky.tf
Ian Fijolek d5078b24da Refactor use of wesher to be behind a variable toggle
Occasionally I run into issues with Wesher. This makes it easier to
disable use of Wesher by setting TF_VAR_use_wesher to false.
2023-08-24 12:51:32 -07:00

22 lines
355 B
HCL

locals {
config_data = templatefile(
"${path.module}/config.yml",
{
base_hostname = var.base_hostname,
}
)
}
resource "nomad_job" "blocky" {
hcl2 {
enabled = true
vars = {
"config_data" = local.config_data,
}
}
jobspec = templatefile("${path.module}/blocky.nomad", {
use_wesher = var.use_wesher,
})
}