Default Environment Context 'AzureChinaCloud' #411
Labels
bug
The issue is a bug.
needs investigation
The issue needs to be investigated by the maintainers or/and the community.
I have just downloaded the latest version from the gallery today and when creating a new context the default value that gets assigned to the context is 'AzureChinaCloud'. Even I try overriding by specifying the Environment parameter.
Result:
Environment:
I tried debugging execution but it looks to be setting the value correctly to AzureCloud so not sure how it's ending up as AzureChinaCloud in the returned object.
It hits the
Account
value in the switch here:https://github.com/PlagueHO/CosmosDB/blob/main/source/Public/utils/New-CosmosDbContext.ps1#L166-L169
Even inside the
Get-CosmosDbUri
function,$environment
is showingAzureCloud
I can see that there is no Environment being passed into the context object here:
https://github.com/PlagueHO/CosmosDB/blob/main/source/Public/utils/New-CosmosDbContext.ps1#L184-L192
Not sure if that's the cause or not. Will try and debug some more over the weekend to find out. Unfortunately the class object is not visible in the debugger when stepping through the code.
The text was updated successfully, but these errors were encountered: