Check result of config.ConfigureTLS()
This commit is contained in:
parent
7da8e9285e
commit
b5d891b109
|
@ -107,7 +107,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
|
|||
clientAuthKey = clientAuth["key_file"].(string)
|
||||
}
|
||||
|
||||
config.ConfigureTLS(&api.TLSConfig{
|
||||
err := config.ConfigureTLS(&api.TLSConfig{
|
||||
CACert: d.Get("ca_cert_file").(string),
|
||||
CAPath: d.Get("ca_cert_dir").(string),
|
||||
Insecure: d.Get("skip_tls_verify").(bool),
|
||||
|
@ -115,6 +115,9 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
|
|||
ClientCert: clientAuthCert,
|
||||
ClientKey: clientAuthKey,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to configure TLS for Vault API: %s", err)
|
||||
}
|
||||
|
||||
client, err := api.NewClient(config)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue