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

@@ -185,6 +185,13 @@ func (c *KVPatchCommand) Run(args []string) int {
return code
}
if Format(c.UI) == "table" {
outputPath(c.UI, path, "Secret Path")
metadata := secret.Data
c.UI.Info(getHeaderForMap("Metadata", metadata))
return OutputData(c.UI, metadata)
}
return OutputSecret(c.UI, secret)
}