0

Im deploying azure storage for a durable function app. The storage has blob, share, table and file storage. Ive tried deploying via DEVOPS & manually in the portal via "deploy a custom template".

Most of the other storage types get created, except for fileServices/Shares Each time i get the same error:

{
"status": "Failed",
"error": {
    "code": "InvalidHeaderValue",
    "message": "The value for one of the HTTP headers is not in the correct format.\nRequestId:758ffc50-101a-005c-01a6-84927f000000\nTime:2022-06-20T13:05:40.2893940Z"
}

}

The ARM code was exported from a successfully created storage account in azure portal. I changed the API version from 2021-09-01 to 2019-06-01 based on a result of a search of StackOverflow, but this did not help.

Appreciate any advice on what to try next.

code for the fileservice/shares portion of the arm script that keeps failing is below:

  {
    "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
    "apiVersion": "2019-06-01",
    "name": "[concat(parameters('storageAccounts_testvalue202206151534_name'), '/default/', parameters('storageAccounts_testvalue202206151534_name'), '04')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts/fileServices', parameters('storageAccounts_testvalue202206151534_name'), 'default')]",
      "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_testvalue202206151534_name'))]"
    ],
    "properties": {
      "accessTier": "TransactionOptimized",
      "shareQuota": 5120,
      "enabledProtocols": "SMB"
    }
  }
wilson_smyth
  • 1,202
  • 1
  • 14
  • 39

1 Answers1

0

To resolve the error "InvalidHeaderValue" , try removing properties section from ARM template like below and deploy:

{
    "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
    "apiVersion": "2019-06-01",
    "name": "[concat(parameters('storageAccounts_testvalue202206151534_name'), '/default/', parameters('storageAccounts_testvalue202206151534_name'), '04')]",
    "dependsOn": [
      "[resourceId('Microsoft.Storage/storageAccounts/fileServices', parameters('storageAccounts_testvalue202206151534_name'), 'default')]",
      "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_testvalue202206151534_name'))]"
    ]
}
  • Removing the properties section allows you to continue deployment but it may lead to runtime unreachable error.
  • Instead of configuring file share separately, let the function app create them by passing the required app settings.

Please check this similar issue answered by Lokanath das that helps you to get rid of the error.

While performing the deployment, please consider the below points:

  • Make sure to create the storage account first and then create the function app.
  • Please check whether you are authorized to access the resource, if not create SAS on file or share level with read permission as mentioned in this SO thread by Gaurav Mantri like below:

enter image description here

Please find the below references for more information:

How do I deploy file share within storage account using ARM template - Stack Overflow

Azure File Storage URL in browser showing InvalidHeaderValue - Stack Overflow

Sridevi
  • 10,599
  • 1
  • 4
  • 17