[Solved]Alter the max_version attribute of an existing KV store version 2

Hello,

I want to alter the max_version attribute of an existing KV store (version 2) but I cannot manage to achieve it, either from the Web UI or from the vault CLI.

I know we can set it at the level of each key inside the store but we have lots of existing keys and we want the setting to be applied for future added key inside the store.

Does anyone have some clues ?

Regards.

vault write secret/config max_versions=10 where secret is the name of your KV mount and replace 10 with your desired value.

Note that the UI doesn’t seem to update dynamically with this. I had to force a cache flush for it to be reflected in the UI. Reading the config from the CLI (vault read secret/config) worked fine immediately afterward.

Unfortunately, it doesn’t seem to work as you describe

image
image

We are using Vault 1.9.2+ent.hsm

I believe it needs to be max_versions and not max_version in your command

Thanks that’s solve it :star_struck: