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
I had written a fairly verbose job file to support a Cockroach DB deployment connected with Consul. I then wanted to better handle the complexity of the maintaining the job file, but I ran into an unexpected issue when using a variable in the Docker task driver's config stanza. It seems that variable is interpolated as the the string "${var.name}" instead of the actual var.name string value, causing the job to fail.
Reproduction steps
Use a variable within a config or env stanza for a task, see that it's not properly interpolated.
Expected Result
HCL2 variables would be interpolated to their actual value.
Actual Result
HCL2 variables within the config stanza (or env stanza) for a task doesn't seem to interpolate correctly.
☝️ The args within the config stanza for the task doesn't interpolate that way I would expect. The ${instance.value} is treated as just a normal string. I would expect this to be able to be the port value for the iterated local.instances.
I've tried a bunch of different variations including more local variables, dynamic blocks, and there doesn't seem to be a way to properly access these variables from within the config stanza? Is expected behavior?
The text was updated successfully, but these errors were encountered:
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
Operating system and Environment details
n/a
Issue
I had written a fairly verbose job file to support a Cockroach DB deployment connected with Consul. I then wanted to better handle the complexity of the maintaining the job file, but I ran into an unexpected issue when using a variable in the Docker task driver's
config
stanza. It seems that variable is interpolated as the the string"${var.name}"
instead of the actualvar.name
string value, causing the job to fail.Reproduction steps
Use a variable within a
config
orenv
stanza for a task, see that it's not properly interpolated.Expected Result
HCL2 variables would be interpolated to their actual value.
Actual Result
HCL2 variables within the
config
stanza (orenv
stanza) for a task doesn't seem to interpolate correctly.Job file (if appropriate)
☝️ The
args
within theconfig
stanza for the task doesn't interpolate that way I would expect. The${instance.value}
is treated as just a normal string. I would expect this to be able to be the port value for the iteratedlocal.instances
.I've tried a bunch of different variations including more local variables, dynamic blocks, and there doesn't seem to be a way to properly access these variables from within the
config
stanza? Is expected behavior?The text was updated successfully, but these errors were encountered: