@@ -3,6 +3,7 @@ package cloudconfig
3
3
import (
4
4
"encoding/json"
5
5
"fmt"
6
+ "maps"
6
7
"os"
7
8
"strings"
8
9
@@ -26,6 +27,7 @@ func NewCloudConfig(cloudName string) (config CloudEnvironment, err error) {
26
27
Name : AzurePublicCloud ,
27
28
Configuration : cloud .AzurePublic ,
28
29
}, nil
30
+ config .Configuration .Services = maps .Clone (config .Configuration .Services )
29
31
injectServiceConfig (& config .Configuration , ServiceNameMicrosoftGraph , cloud.ServiceConfiguration {
30
32
Audience : "https://graph.microsoft.com/" ,
31
33
Endpoint : "https://graph.microsoft.com" ,
@@ -42,6 +44,7 @@ func NewCloudConfig(cloudName string) (config CloudEnvironment, err error) {
42
44
Name : AzureChinaCloud ,
43
45
Configuration : cloud .AzureChina ,
44
46
}, nil
47
+ config .Configuration .Services = maps .Clone (config .Configuration .Services )
45
48
injectServiceConfig (& config .Configuration , ServiceNameMicrosoftGraph , cloud.ServiceConfiguration {
46
49
Audience : "https://microsoftgraph.chinacloudapi.cn/" ,
47
50
Endpoint : "https://microsoftgraph.chinacloudapi.cn" ,
@@ -58,6 +61,7 @@ func NewCloudConfig(cloudName string) (config CloudEnvironment, err error) {
58
61
Name : AzureGovernmentCloud ,
59
62
Configuration : cloud .AzureGovernment ,
60
63
}, nil
64
+ config .Configuration .Services = maps .Clone (config .Configuration .Services )
61
65
injectServiceConfig (& config .Configuration , ServiceNameMicrosoftGraph , cloud.ServiceConfiguration {
62
66
Audience : "https://login.microsoftonline.us/" ,
63
67
Endpoint : "https://login.microsoftonline.us" ,
0 commit comments