mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
Output full secret path in certain kv commands (#14301)
* Full secret path in table output of get and put * Add path output to KV patch and metadata get * Add changelog * Don't print secret path for kv-v1 * Make more readable * Switch around logic to not swallow error * Add test for secret path * Fix metadata test * Add unit test for padequalsigns * Remove wonky kv get tests
This commit is contained in:
@@ -158,6 +158,10 @@ func (c *KVGetCommand) Run(args []string) int {
|
||||
tf.printWarnings(c.UI, secret)
|
||||
}
|
||||
|
||||
if v2 {
|
||||
outputPath(c.UI, path, "Secret Path")
|
||||
}
|
||||
|
||||
if metadata, ok := secret.Data["metadata"]; ok && metadata != nil {
|
||||
c.UI.Info(getHeaderForMap("Metadata", metadata.(map[string]interface{})))
|
||||
OutputData(c.UI, metadata)
|
||||
|
||||
Reference in New Issue
Block a user