Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Also populate vault client insecure flag.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Cornies <[email protected]>
  • Loading branch information
acornies committed Mar 13, 2019
1 parent 8e0ab63 commit b2bbaa7
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions vault/vault_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import (
"io/ioutil"
"net/http"

"github.com/hashicorp/go-hclog"

"github.com/hashicorp/consul-template/dependency"
"github.com/hashicorp/faas-nomad/types"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/api"
)

Expand All @@ -22,16 +20,12 @@ type VaultService struct {

func NewVaultService(config *types.VaultConfig, log hclog.Logger) *VaultService {

vaultClient, _ := api.NewClient(api.DefaultConfig())
clientConfig := api.DefaultConfig()
clientConfig.ConfigureTLS(&api.TLSConfig{Insecure: config.TLSSkipVerify})
vaultClient, _ := api.NewClient(clientConfig)

vaultClient.SetAddress(config.Addr)

clientSet := dependency.NewClientSet()
clientSet.CreateVaultClient(&dependency.CreateVaultClientInput{
Address: config.Addr,
Token: vaultClient.Token(),
})

vs := &VaultService{
Client: vaultClient,
Config: config,
Expand Down

0 comments on commit b2bbaa7

Please sign in to comment.