Vault secret in Nomad Volume definition

Hello all,

I am looking to have a Vault secret be put into my volume creation much like I would be able to template data into a file in a nomad job.

Specifically I would like to use a secret that is in Vault for secrets.userKey in the volume configuration.

I don’t think it will work to put:

secrets {
  userID = "my_user" 
  userKey = {{ with secret cephCSI }}{{ .Data.data.userKey }}{{ end }}
}

So I’m looking to see if there’s another way to template this out by using the nomad integration. Thanks!

Hi @acziryak,

Unfortunately this is not currently possible. We do have issue #7978 to track this future feature request, so please add a +1 to this to the opening comment.

I am not sure of any current workaround; if someone in the community has an alternative that would be great to hear about.

Thanks,
jrasell and the Nomad team