Skip to content

Commit 4b1f2d1

Browse files
MartinForRealcvvz
authored andcommitted
bump azclient and fix signature change
1 parent 5033af4 commit 4b1f2d1

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

test/utils/azure/azure_helper.go

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import (
2222
"os"
2323
"time"
2424

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

4038
func GetClient(cloud, subscriptionID, clientID, tenantID, clientSecret string) (*Client, error) {
4139
armConfig := &azclient.ARMClientConfig{
42-
Cloud: cloud,
40+
Cloud: cloud,
41+
TenantID: tenantID,
4342
}
44-
cloudConfig, err := azclient.GetAzureCloudConfig(armConfig)
45-
if err != nil {
46-
return nil, err
47-
}
48-
credProvider, err := azclient.NewAuthProvider(azclient.AzureAuthConfig{
49-
TenantID: tenantID,
43+
credProvider, err := azclient.NewAuthProvider(armConfig, &azclient.AzureAuthConfig{
5044
AADClientID: clientID,
5145
AADClientSecret: clientSecret,
52-
}, &arm.ClientOptions{
53-
AuxiliaryTenants: []string{tenantID},
54-
ClientOptions: policy.ClientOptions{
55-
Cloud: *cloudConfig,
56-
},
5746
})
5847
if err != nil {
5948
return nil, err

0 commit comments

Comments
 (0)