Skip to content

Commit

Permalink
bump azclient and fix signature change
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinForReal authored and cvvz committed Jan 9, 2024
1 parent 5033af4 commit 4b1f2d1
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions test/utils/azure/azure_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"os"
"time"

"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
resources "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources"
"sigs.k8s.io/cloud-provider-azure/pkg/azclient"
Expand All @@ -39,21 +37,12 @@ type Client struct {

func GetClient(cloud, subscriptionID, clientID, tenantID, clientSecret string) (*Client, error) {
armConfig := &azclient.ARMClientConfig{
Cloud: cloud,
Cloud: cloud,
TenantID: tenantID,
}
cloudConfig, err := azclient.GetAzureCloudConfig(armConfig)
if err != nil {
return nil, err
}
credProvider, err := azclient.NewAuthProvider(azclient.AzureAuthConfig{
TenantID: tenantID,
credProvider, err := azclient.NewAuthProvider(armConfig, &azclient.AzureAuthConfig{
AADClientID: clientID,
AADClientSecret: clientSecret,
}, &arm.ClientOptions{
AuxiliaryTenants: []string{tenantID},
ClientOptions: policy.ClientOptions{
Cloud: *cloudConfig,
},
})
if err != nil {
return nil, err
Expand Down

0 comments on commit 4b1f2d1

Please sign in to comment.