Loading secrets from a file into a kv-engine at startup

Hi there,

I’m currently getting to know Vault more intimately and I’d like to know whether there’s an easy way to generate content for a KV engine from a file (say, a file with one /my/path:key=secret entry per line or a dedicated .hcl file). I’m running vault in dev mode, so security is not an issue here.

This can, of course, be trivially done via a shell script but I wonder whether there’s a built-in method. I’m working inside docker containers and one single, all-encompassing startup command would be preferable over an initialization routine with background processes, sleeps and shell scripts.

You would need to script this yourself.

If you think about it, if you’re willing to have these “secrets” in a file on disk, then they’re not really as “secret” as Vault’s primary intended use-case.

Sensible, indeed. Thank you very much!