Description
Is your feature request related to a problem? Please describe.
When building scripts and pipeline using Vault CLI, we often have the requirement to check for token validity and try to renew the token for the amount expected script runtime. Of course it is possible to renew the token with vault token renew
but the CLI just prints a warning to stderr
in case it can not fulfill the requested time increase and caps it to the max value. This makes it cumbersome to parse that WARNING or the TTL and then dicide based on the result to propably re-login.
Describe the solution you'd like
It would be nice if the vault token renew
command had an option to let the command fail in case the request can not be fulfilled. This would make it possible to chain Vault CLI executions like that:
vault token renew -increment=5m || vault login ...
Jan Roehrich jan.roehrich@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, legal info/Impressum
Activity