Given the Consul keys:
flyway/tweedle/server: postgres
flyway/beetle/server: postgres
flyway/battle/server: mysql
service/tweedle/repo: fox/tweedle.git
service/beetle/repo: fox/beetle.git
service/battle/repo: fox/battle.git
I'm trying to loop through the top set, using the key to lookup values in the bottom set, using this code (that doesn't work):
{
{{ range $key, $pairs :=tree "flyway/" | explode }}
$key: {{ key "service/{{$key}}/repo" }}
{{ end }}
}
to get:
tweedle: fox/tweedle.git
beetle: fox/beetle.git
battle: fox/battle.git