In my job definition, I have the following template:
variables {
environment = "staging"
}
...
task "server" {
template {
data = file("vars.env")
destination = "secrets/file.env"
env = true
}
...
And my vars.env
have something like
ENVIRONMENT=${var.environment}
But the template doesn't get the interpolated string, only the raw text from the file.
Is there a way to tell nomad to use the local variables when parsing the vars.env
file?