Hi everyone,
I’m new to Consul and played around with for a bit. I now have a consul configuration that works for me now. I tested this configuration as configuration flags for the consul binary
consul agent
-bootstrap-expect 3
-bind '{{ GetAllInterfaces | include "network" "10.17.0.0/24 " }}'
-datacenter dc1
-data-dir /consul/data
-domain consul
-encrypt "secretToken="
-rejoin
-retry-join "node2"
-retry-join "node3"
-server
Now I would like to provide this exact config as a hcl config file. However I cannot figure out how I need to specify my sockaddr template in the hcl for consul to accept it.
When I test my template directly with sockaddr everything is fine but when I run consul validate consul.hcl
I get Config validation failed: bind_addr cannot be empty
This is my consul.hcl:
bind_addr = "GetAllInterfaces | include \"network\" \"10.17.0.0/24\" "
bootstrap_expect = 3
datacenter = "dc1"
data_dir = "/consul/data"
encrypt = "secretToken="
server = true
rejoin_after_leave = true
retry_join = ["node2", "node3"]
Can anyone point me in the right direction on how to specify that sockaddr template in a hcl file?