HI i have a certificate in .pem format i need to store the content in vault KV secret engine instead of copy paste the content in value. Any option to read and store the content in KV engine through cmd line or script
vault kv put kv/some/path contents=@filename_goes_here
In this example, contents
is just an arbitrary name I picked for the example. Since the Vault KV stores JSON objects, not files, you have to pick some key name to store your data under.
Please note that since this command is converting the data to JSON, you cannot use this to store arbitrary binary files (since JSON doesn’t support arbitrary binary). But .pem files are text, so this use-case is OK.