I'm trying to store the result of a base64encode
inside an env
block like so:
env {
HOST_ID = "${base64encode("${NOMAD_ADDR_serviceA}")}"
}
Which results in HOST_ID
holding the base64 encoded string "${NOMAD_ADDR_serviceA}" and not the value of NOMAD_ADDR_serviceA
as I had hoped. E.g. HOST_ID = JHtOT01BRF9BRERSX3NlcnZpY2VBfQ==
.
I have also tried:
env {
HOST_ID = base64encode("${NOMAD_ADDR_serviceA}")
}
... but this generates the same encoding.
Any idea how I can reach the expected outcome? Any help would be appreciated!
Edit: I've also tried the following:
HOST_ID = "${base64encode(NOMAD_ADDR_serviceA)}"
but no luck.