terraspace icon indicating copy to clipboard operation
terraspace copied to clipboard

Terraspace azure China

Open ccseancc opened this issue 3 years ago • 3 comments

When I use terraspace with azure China service principal, and run terraspace up, it prompt login fail error. Set ARM_environment cannot help to solve the issue , testing result with azure_check.rb also fail , and it seems will ignore the ARM_environment value

ccseancc avatar Apr 23 '21 17:04 ccseancc

I guess to login Azure China you do not use the standard Microsoft login page (as it's managed by 21Vianet), so something needs to be changed in Terraspace to point to the right URL to be able to use Service Principal. Do you have the login page to log in to your Azure China subscription?

HoLengZai avatar Apr 18 '22 16:04 HoLengZai

Haven’t played with Azure China yet. Wondering if someone who has knows what the login url is suppose to be or point in the right direction.

The Azure login is handled with the armrest gem and the login url is currently set here https://github.com/boltops-tools/armrest/blob/3bb38d3466556a7b77c6786fd252de02da533e10/lib/armrest/api/auth/login.rb#L4

tongueroo avatar Apr 18 '22 17:04 tongueroo

Thanks @tongueroo. I do not use Azure China so I cannot really try but i found this article from Microsoft Docs: https://docs.microsoft.com/en-us/azure/china/resources-developer-guide#check-endpoints-in-azure Look for Azure AAD row

So on the line 4, it should be that URL to reach Azure China data centers https://login.chinacloudapi.cn/

HoLengZai avatar Apr 18 '22 17:04 HoLengZai