-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String interpolation with function call not working for meta
properties
#9870
Comments
@TylerPachal the HCL2 functions like job "example" {
datacenters = ["dc1"]
meta {
tag = substr("SOMEVALUE", 0, 7)
}
group "cache" {
network {
port "db" {
to = 6379
}
}
task "redis" {
driver = "docker"
config {
image = "redis:3.2"
ports = ["db"]
}
resources {
cpu = 500
memory = 256
}
}
}
}
|
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. |
Nomad version
0.12.9
Issue
String interpolation with function call not working for
meta
properties.I have two places in my
.hcl
file where I am using thesubstr
function to grab the short version of my commit hash, which is used to tag my docker image. In themeta
stanza, the string is not interpolated, and as show as-is in the UI (see the screenshot). In thetask/config
stanza, it works fine.Job file
This is what is presented in the UI:

I also tried doing the following, but it was invalid
hcl
:Edit: We are using Levant to do the replacement of
DEPLOY_SUB___VERSION
.The text was updated successfully, but these errors were encountered: