Skip to content

Instantly share code, notes, and snippets.

@andrewwatson
Created May 13, 2015 18:13
Show Gist options
  • Save andrewwatson/867522fea73fbd01881f to your computer and use it in GitHub Desktop.
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