Create a storage share header encode bug
yupwei68 opened this issue · 1 comments
code :
Ref to :hashicorp/terraform-provider-azurerm#4782
While creating a storage share: the header value for "x-ms-share-quota" encounters an UTF-8 encoding bug.
Error: Error creating Share "bits" (Account "nancyctest1234" / Resource Group "nancyc-rg-1"): shares.Client#Create: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: error response cannot be parsed: "\ufeffInvalidHeaderValue
The value for one of the HTTP headers is not in the correct format.\nRequestId:ad94872b-101a-00c5-1ec1-9230c3000000\nTime:2019-11-04T03:36:16.4360584Zx-ms-share-quota50" error: invalid character 'ï' looking for beginning of value
hi @yupwei68
Thanks for opening this issue.
This UTF8-parsing error is coming from a bug in Azure/Go-AutoRest (where errors were parsed as Json always, rather than as XML if XML is in the response) which has since been fixed and has shipped in version 0.6.0 of this library - which will ship in v1.37 of the Terraform Provider for Azure.
As such I'm going to close this issue for the moment - but the error message should become clearer in v1.37 of Terraform's Azure Provider. It's likely this is to do with the minimum quota size changing depending on the Storage Account Type being used (e.g. Standard vs Premium) - as is detailed in hashicorp/terraform-provider-azurerm#4782
Thanks!