Passing environment variables to Nomad HCL file for making a client

326 views Asked by At

This is my HCL File

data_dir  = "/opt/nomad/data"
bind_addr = "0.0.0.0"

server {
  enabled = false
}

client {
  enabled = true
  node_class = "web_ingress"
  server_join {
    retry_join = ["SOMEADDRESS"]
    retry_max = 3
    retry_interval = "15s"
  }
}

plugin "docker" {
  config {
    volumes {
      enabled = true
    }
  }
}

Now i want to replace SOMEADDRESS with a variable that is generated at runtime. Is there a way to do this? I went through Nomad's Documentation and it's not immediately clear how it is done.

1

There are 1 answers

0
KamilCuk On

No, there is no way to do this. Write your own command that will do that before starting nomad.