Skip to content

Commit

Permalink
BOSH_CLIENT and BOSH_CLIENT_SECRET used
Browse files Browse the repository at this point in the history
The bosh client that communicates with bosh will now use these
environment variables. They override that which is in the bosh config.
  • Loading branch information
thomasmitchell committed Oct 9, 2018
1 parent 6ace750 commit 0ef04ef
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ func getBoshClient(ctx compContext) (*client, error) {
ret.Password = env.Password
ret.RefreshToken = env.RefreshToken

//--client and --client-secret flags override config
if client, found := ctx.Flags["--client"]; found {
ret.Username = client[0]
}

if clientSecret, found := ctx.Flags["--client-secret"]; found {
ret.Password = clientSecret[0]
}

boshClient = ret

return boshClient, nil
Expand Down

0 comments on commit 0ef04ef

Please sign in to comment.