AzureMonitor: strongly-typed AzureCredentials and correct resolution of auth type and cloud (#36284)

This commit is contained in:
Sergey Kostrukov
2021-07-05 03:20:12 -07:00
committed by GitHub
parent 719e78f333
commit 89ba607382
15 changed files with 749 additions and 404 deletions
+1 -2
View File
@@ -92,8 +92,7 @@ func getTokenProvider(ctx context.Context, cfg *setting.Cfg, ds *models.DataSour
if tokenAuth == nil {
return nil, fmt.Errorf("'tokenAuth' not configured for authentication type '%s'", authType)
}
provider := newAzureAccessTokenProvider(ctx, cfg, tokenAuth)
return provider, nil
return newAzureAccessTokenProvider(ctx, cfg, tokenAuth)
case "gce":
if jwtTokenAuth == nil {