Skip to content

Commit ae85c8c

Browse files
authored
influxdb job: minor fixes (#152)
* influxdb should depend on nomad_variable.influxdb * variables in the template should be quoted
1 parent 121dd79 commit ae85c8c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

infra/eu-west-2/core-nomad/influxdb.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ resource "nomad_variable" "influxdb" {
6363
}
6464

6565
resource "nomad_job" "influxdb" {
66-
depends_on = [nomad_csi_volume_registration.influxdb]
67-
jobspec = file("${path.module}/../../../shared/nomad/jobs/influxdb.nomad.hcl")
66+
depends_on = [
67+
nomad_csi_volume_registration.influxdb,
68+
nomad_variable.influxdb
69+
]
70+
jobspec = file("${path.module}/../../../shared/nomad/jobs/influxdb.nomad.hcl")
6871

6972
hcl2 {
7073
vars = {

shared/nomad/jobs/influxdb.nomad.hcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ job "influxdb" {
7373
template {
7474
data = <<EOF
7575
{{with nomadVar "nomad/jobs/influxdb"}}
76-
DOCKER_INFLUXDB_INIT_PASSWORD={{.admin_password}}
77-
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN={{.admin_token}}
76+
DOCKER_INFLUXDB_INIT_PASSWORD="{{.admin_password}}"
77+
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN="{{.admin_token}}"
7878
{{end}}
7979
EOF
8080
destination = "${NOMAD_SECRETS_DIR}/env"

0 commit comments

Comments
 (0)