HashiCorp Vault project - write additional key/value pair without overwritting existing ones
Vault with kv v2 engine has added this ability.
vault kv patch secret/item newkey=newvalue
You can only store one value per key. (Confirmed by Vault developer) Either you think on a data structure that is suitable and write a long string to this key or you are using a single key for each value which could look as follows:
vault write secret/item/33/name item_name='item_name'
vault write secret/item/33/type item_type='item_type'
Vault doesn't allow you to append to an existing secret. It's actually really annoying. You first have to read the previous key/values and then write them back in at the same time that you're writing in the new key/values.
Here is a blog post I found where someone talks about that process: https://www.fritz.ninja/extending-vault-cli-with-some-ruby-love/
Essentially, he wrote his own command line tool that does the append for you automatically. He says he created the tool for his job, so he can't share the code, but he's started an open-source version on Github called Vaulty
: https://github.com/playpasshq/vaulty