backport of commit 3130e8ba94 (#22867)

This commit is contained in:
hc-github-team-secure-vault-core
2023-09-07 16:01:16 -04:00
committed by GitHub
parent df758c4eaa
commit 2eea7faf61
3 changed files with 13 additions and 0 deletions

View File

@@ -216,6 +216,11 @@ func (c *KVPutCommand) Run(args []string) int {
return PrintRawField(c.UI, secret, c.flagField)
}
// If the secret is wrapped, return the wrapped response.
if secret.WrapInfo != nil && secret.WrapInfo.TTL != 0 {
return OutputSecret(c.UI, secret)
}
if Format(c.UI) == "table" {
outputPath(c.UI, fullPath, "Secret Path")
metadata := secret.Data