Skip to content

Commit

Permalink
Merge pull request #838 from apeschel/topic/apeschel/fix_azkv_envCred
Browse files Browse the repository at this point in the history
Fix SOPS azkv envCred
  • Loading branch information
stefanprodan authored May 2, 2023
2 parents 6c6525c + 2b98fbf commit 8d909da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/sops/azkv/keysource.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,13 @@ func getDefaultAzureCredential() (azcore.TokenCredential, error) {
)

var errorMessages []string
var creds []azcore.TokenCredential
options := &azidentity.DefaultAzureCredentialOptions{}

envCred, err := azidentity.NewEnvironmentCredential(&azidentity.EnvironmentCredentialOptions{
ClientOptions: options.ClientOptions, DisableInstanceDiscovery: options.DisableInstanceDiscovery},
)
if err == nil {
creds = append(creds, envCred)
return envCred, nil
} else {
errorMessages = append(errorMessages, "EnvironmentCredential: "+err.Error())
}
Expand Down

0 comments on commit 8d909da

Please sign in to comment.