Skip to content

Instantly share code, notes, and snippets.

@andrewwatson
Created May 13, 2015 18:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save andrewwatson/867522fea73fbd01881f to your computer and use it in GitHub Desktop.
better consul-template service iteration
{{range services}}
{{if .Name | regexMatch "data*"}}
listen http-in
bind *:{{env "ENTERPRISE_BIND"}}{{range service .Name}}
server {{.Node}}{{.Port}} {{.Address}}:{{.Port}}{{end}}
{{end}}
{{end}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment