Minor cleanup to backups module
This commit is contained in:
parent
0a7ad7a9dc
commit
85db434c1f
@ -1,15 +1,14 @@
|
|||||||
resource "nomad_job" "backup" {
|
resource "nomad_job" "backup" {
|
||||||
|
hcl2 {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
jobspec = templatefile("${path.module}/backup.nomad", {
|
jobspec = templatefile("${path.module}/backup.nomad", {
|
||||||
module_path = path.module,
|
module_path = path.module,
|
||||||
batch_node = null,
|
batch_node = null,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get Nomad clients from Consul
|
|
||||||
# data "consul_service" "nomad" {
|
|
||||||
# name = "nomad-client"
|
|
||||||
# }
|
|
||||||
|
|
||||||
resource "nomad_job" "backup-oneoff" {
|
resource "nomad_job" "backup-oneoff" {
|
||||||
# TODO: Get list of nomad hosts dynamically
|
# TODO: Get list of nomad hosts dynamically
|
||||||
for_each = toset(["n1", "n2"])
|
for_each = toset(["n1", "n2"])
|
||||||
@ -17,6 +16,11 @@ resource "nomad_job" "backup-oneoff" {
|
|||||||
# for node in data.consul_service.nomad.service :
|
# for node in data.consul_service.nomad.service :
|
||||||
# node.node_name
|
# node.node_name
|
||||||
# ])
|
# ])
|
||||||
|
|
||||||
|
hcl2 {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user