Open hoopty opened 6 years ago
It's not just a change from .com to .us. You need to change the endpoints for both AAD and ARM. The below file has a mapping of these endpoints for each of the different Azure clouds. https://github.com/projectkudu/ARMClient/blob/master/ARMClient.Authentication/Constants.cs
I'd recommend exposing a new environment property under credentials section in the yaml which maps to Public, China, Germany, and USGov. Internally within the exporter, the code can look up the appropriate endpoint.
Do Microsoft have a library for this?
I don't know if there is an official library for this but in Azure PowerShell, there is a cmdlet called Get-AzureRmEnvironment which returns back the environment settings for each of the clouds. Looking at the PowerShell code, it maps back to this file -- which is probably more official than the link I posted above.
That's CSharp which won't help us much. Is there a java one somewhere?
I checked the Azure SDK for Java but I didn't see anything. I would check with the folks here. https://github.com/Azure/azure-libraries-for-java
It would be ideal if endpoints could be overloaded for alternate Azure environments like Gov. I believe just the TLD changes to .us (instead of .com), but need to validate that. I'll try to work on a PR, but wanted to mention her as well.