diff --git a/jobs/http.nomad b/jobs/http.nomad index 7ffff9a..e52d6c6 100644 --- a/jobs/http.nomad +++ b/jobs/http.nomad @@ -12,22 +12,30 @@ job "http" { datacenters = ["dc1"] group "http" { - volume "caddycerts" { - type = "csi" - source = "caddycerts" - read_only = false - access_mode = "single-node-writer" - attachment_mode = "file-system" + dynamic "volume" { + for_each = local.main ? [{}] : [] + labels = ["caddycerts"] + content { + type = "csi" + source = "caddycerts" + read_only = false + access_mode = "single-node-writer" + attachment_mode = "file-system" + } } task "http" { driver = "docker" - volume_mount { - volume = "caddycerts" - destination = "/etc/caddycerts" - read_only = false + dynamic "volume_mount" { + for_each = local.main ? [{}] : [] + content { + volume = "caddycerts" + destination = "/etc/caddycerts" + read_only = false + } } + dynamic "artifact" { for_each = local.main ? [{}] : []