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
1 changed files with 5 additions and 4 deletions

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,