diff --git a/services/backups/backups.tf b/services/backups/backups.tf index a4a5ed7..1f02765 100644 --- a/services/backups/backups.tf +++ b/services/backups/backups.tf @@ -1,15 +1,14 @@ resource "nomad_job" "backup" { + hcl2 { + enabled = true + } + jobspec = templatefile("${path.module}/backup.nomad", { module_path = path.module, batch_node = null, }) } -# Get Nomad clients from Consul -# data "consul_service" "nomad" { -# name = "nomad-client" -# } - resource "nomad_job" "backup-oneoff" { # TODO: Get list of nomad hosts dynamically for_each = toset(["n1", "n2"]) @@ -17,6 +16,11 @@ resource "nomad_job" "backup-oneoff" { # for node in data.consul_service.nomad.service : # node.node_name # ]) + + hcl2 { + enabled = true + } + jobspec = templatefile("${path.module}/backup.nomad", { module_path = path.module, batch_node = each.key,