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 fafe8f0103
commit 04adb5db04

View File

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