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:
VAL
2022-03-08 13:17:27 -08:00
committed by GitHub
parent f142cb41db
commit 191868d2b1
7 changed files with 139 additions and 31 deletions

View File

@@ -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)