honor AllowFail option
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
4
vault.go
4
vault.go
@@ -69,7 +69,7 @@ func (c *vaultConfig) Init(opts ...config.Option) error {
|
||||
}
|
||||
|
||||
cli, err := api.NewClient(cfg)
|
||||
if err != nil {
|
||||
if err != nil && !c.opts.AllowFail {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ func (c *vaultConfig) Init(opts ...config.Option) error {
|
||||
"role_id": roleID,
|
||||
"secret_id": secretID,
|
||||
})
|
||||
if err != nil {
|
||||
if err != nil && !c.opts.AllowFail {
|
||||
return err
|
||||
}
|
||||
token = rsp.Auth.ClientToken
|
||||
|
Reference in New Issue
Block a user