You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using environment variables to define HCL2 variables (as described in the docs) does not work.
Running a job results in the following output:
$ nomad run test.nomad
Error getting job struct: Error parsing job file from test.nomad:
<nil>: Unset variable "text"; A used variable must be set or have a default value; see https://packer.io/docs/configuration/from-1.5/syntax for details.
Reproduction steps
Create a jobspec as below.
set environment variable as described in the docs$ export NOMAD_VAR_text="hello"
Run job: $ nomad run test.nomad
inline-ing the variable also does not work: $ NOMAD_VAR_text=hello nomad run test.nomad
Thanks @valenvb . That was a 🤦 bug. I've fixed the issue for 1.0.1, and removed the environment variables docs. I'm very sorry we didn't catch this earlier, but aiming to have a release out very soon.
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad version
Nomad v1.0.0 (cfca6405ad9b5f66dffc8843e3d16f92f3bedb43)
Operating system and Environment details
Ubuntu 18.04, tested in
zsh
5.4.2
andbash
4.4.20
Issue
Using environment variables to define HCL2 variables (as described in the docs) does not work.
Running a job results in the following output:
Reproduction steps
$ export NOMAD_VAR_text="hello"
$ nomad run test.nomad
inline-ing the variable also does not work:
$ NOMAD_VAR_text=hello nomad run test.nomad
Job file (if appropriate)
The text was updated successfully, but these errors were encountered: