consul-template not useable with vault's versioned KV store

Created on 16 Jul 2018  路  4Comments  路  Source: hashicorp/consul-template

Have tried to get secrets from the versioned KV with no success (if I want a specific version)
given the following mount point: /secret and the secret test in int,
I am able to use the following template:

{{ with secret "secret/data/test" }}{{ .Data.data }}{{ end }}

and that brings me the latest version.
However, if I want to pin a version, and use it like so:

{{ with secret "secret/data/test?version=1" }}{{ .Data.data }}{{ end }}

I get No value found at secret/data/test?version=1
I assume that it's in part due to the KV being relatively new feature.
Is it planned to be added soon?

Thanks

All 4 comments

I am not sure if this is related. If we try to use KV v2 we get no secret exists at ....
For a v1 it works without any issues.

I've got the same issue. After changing the KV to v2 I also get the mentioned error. Nothing else changed except switching to v2.

But that doesn't resolve the question of getting specific version

Was this page helpful?
0 / 5 - 0 ratings