Splitting/exploding a string from vault in consul template

170 views
Skip to first unread message

dcam...@sofi.org

unread,
Sep 2, 2016, 12:31:59 PM9/2/16
to Consul
I have a vault store that looks like the following:

/secret/users/someuser

key = "groups"
value = "group1,group2,group3" (comma separated values string)

I would like a way to explode that string into an array, and run the consul template {{range}} on the array to loop through each of them. I know I could solve for this by having keys group1 group2 group3 etc, but I would like the key to be dynamic enough to handle any number of values.

Is this possible?
Reply all
Reply to author
Forward
0 new messages