Go back to hard coded node names for for_each

For some reason this worked until it didn't
This commit is contained in:
IamTheFij 2022-10-31 15:21:25 -07:00
parent 25e1dc6566
commit 73b99f80f5

View File

@ -12,10 +12,11 @@ data "consul_service" "nomad" {
resource "nomad_job" "backups-oneoff" { resource "nomad_job" "backups-oneoff" {
# TODO: Get list of nomad hosts dynamically # TODO: Get list of nomad hosts dynamically
for_each = toset([ for_each = toset(["n1", "n2"])
for node in data.consul_service.nomad.service : # for_each = toset([
node.node_name # for node in data.consul_service.nomad.service :
]) # node.node_name
# ])
jobspec = templatefile("${path.module}/backup.nomad", { jobspec = templatefile("${path.module}/backup.nomad", {
module_path = "${path.module}", module_path = "${path.module}",
batch_node = each.key, batch_node = each.key,