We have multiple environments for our apps, and I am trying to use generic consul template and an environment variable to create haproxy configurations for different environments. This is what I am trying to do:
{{$environment := "yellow" }} .... balance leastconn {{range service "myservice-{{$env}}"}} ....
I cannot seem to find a way to use this variable within this range. Is there a way to get this working?
Thanks!