Skip to content

Instantly share code, notes, and snippets.

@OneCricketeer
Created November 17, 2018 04:39
Show Gist options
  • Save OneCricketeer/c5543c5a489ed9df0ade0739fdb0483b to your computer and use it in GitHub Desktop.
Save OneCricketeer/c5543c5a489ed9df0ade0739fdb0483b to your computer and use it in GitHub Desktop.
consul-template CSV
{{ range $index, $element := service "tag.service" }}{{if $index}},{{else}}{{end}}http://{{ .Address }}:{{ .Port }}{{ end }}
@OneCricketeer
Copy link
Author

consul-template -consul-addr "$CONSUL_HOST" -template "service-template.tmpl:/tmp/service-template.out" -once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment