Hey! I need some figuring out how process a nested list in Consul’s Key-value store with Consul Template.
My data is stored this way:
kv/service/data/config/process/servers/0/name → string_value
kv/service/data/config/process/servers/0/enabled → boolean_value
kv/service/data/config/process/servers/1/name → string_value
kv/service/data/config/process/servers/1/enabled → boolean_value
I’ve followed Consul-template documentation but for the life of me, I can’t seem to get my head around how to retrieve these nested values.
If possible, I’d like to generate an output like the following:
service:
data:
config:
process:
servers:
0:
name: <server_name>
enabled: <boolean>
1:
name: <server_name>
enabled: <boolean>
Is this possible to achieve with Consul-template?