From 73b99f80f5cf457348ed1fae4550134a009bd332 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 31 Oct 2022 15:21:25 -0700 Subject: [PATCH] Go back to hard coded node names for `for_each` For some reason this worked until it didn't --- services/backups/backups.tf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/backups/backups.tf b/services/backups/backups.tf index d7ce59d..29791a8 100644 --- a/services/backups/backups.tf +++ b/services/backups/backups.tf @@ -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,