-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
azurerm_storage_account error deserializing json #3028
Comments
In my case I found that a storage account had
instead of
Not sure how it was being set. |
I am running into the same issue.
|
getting same issue - rolling back to a previous version did not help either. |
found a workaround to this issue, it is related to the AzureRM Provider v2.0: #2807
|
We rolled back to I'm not sure how we can deal with this yet. Suggestions? |
This comment has been minimized.
This comment has been minimized.
This error appears when you have an azure storage account in your subscription which has the custom domain feature enabled. It doesn't matter if you manage this account using terraform or not. You can disable that feature, run terraform apply and as soon as terraform passes the initial state check enable that feature again. |
So i have opened an issue in the Since I doubt the terraform team wants to account for this, I have made a fork of the provider and will maintain it until the problem is fixed. As of now, the provider is Enjoy! |
👋 Unfortunately this is an issue in the Azure API where it can return a string or a boolean depending on the last time the resource was modified (which is why the Go SDK fails to parse this sometime). As @samuel-begin has mentioned due to this unfortunately there's not a whole bunch we can do within Terraform (or the Go SDK) to work around this, since the API needs to be fixed to pick one or the other (since updating it to a bool will break if a string is returned, and vica-versa) - as such for the moment I'd suggest +1-ing this issue: Azure/azure-rest-api-specs#5626 Thanks! |
👋 Looks like the upstream issue's been fixed by no longer returning this field from the API: Azure/azure-sdk-for-go#4473 - as such this should be fixed, so I'm going to close this issue for the moment Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.11
Affected Resource(s)
azurerm_storage_container
Terraform Configuration Files
Expected Behavior
terraform command succeeds
Actual Behavior
azurerm_storage_container.default: Error loading the Resource Groups for Storage Account "accountname": storage.AccountsClient#List: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal string into Go struct field CustomDomain.useSubDomainName of type bool'
Steps to Reproduce
terraform apply
orterraform plan
orterraform import
The text was updated successfully, but these errors were encountered: