New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardcoded blob.core.windows.net makes azurerm not work in China (proably Germany and Government environments too) #11136
Comments
besides that seems like the external library has some other things hardcoded https://github.com/Azure/azure-sdk-for-go/blob/master/storage/client.go#L24 |
this patch solved my problem.
but again, looks like azure-sdk-for-go isn't multi-environment ready |
@nicocesar seems that I missed the storage service clients when adding multi-environment support, the SDK exposes a method for overriding the service url, I'll have a look at this soon. |
@pmcatominey is this related to the NewBasicClient created here : https://github.com/Azure/azure-sdk-for-go/blob/master/storage/client.go#L124-L132 ? |
@nicocesar yep, we'll need to switch to the NewClient method below and pass in the correct service url which we get from the environment |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform v0.8.4-dev (6bafd4c+CHANGES)
(modified version with patch published in #11131)
Affected Resource(s)
resource_azure_instance
resource_azure_data_disk
Terraform Configuration Files
https://www.dropbox.com/s/ij7u77i37mvwbb1/invalid_character_error.zip?dl=0
(same as #11131)
Debug Output
Expected Behavior
create a disk in the corresponding endpoint for china
Actual Behavior
how is azurerm_storage_account.storage.primary_blob_endpoint being used? I'm getting blob.core.windows.net But actually is blob.core.chinacloudapi.cn:
azure account env show AzureChinaCloud
(..)
data: storageEndpointSuffix: .core.chinacloudapi.cn
Steps to Reproduce
terraform apply -state mystate.tfstate -var-file invalid_character_error.tfvars -target=azurerm_virtual_machine.api
Important Factoids
The text was updated successfully, but these errors were encountered: