Minor cleanup to backups module

This commit is contained in:
IamTheFij 2023-07-07 15:50:58 -07:00
parent 0a7ad7a9dc
commit 85db434c1f

View File

@ -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,