I created an ARM template a while ago that was working fine, but all of a sudden now I have no host keys listed even though the arm deployment logging shows as successful.
I've tried to create a "default" / "_master" host key in Azure Portal, and despite saying it's successful, it auto-refreshes and still lists nothing.
In the activity log, a 404 error is listed for "List Web Apps Functions Host Keys" with the message "Encountered an error (InternalServerError) from host runtime."
If I create it via Azure Portal, then those keys did show in one attempt, but then were not created in a later attempt (see above image). The configuration app settings of the portal and arm deployments are identical to the function app (that did have the host keys), including the "AzureWebJobsStorage" app setting value.
It's using a general usage V2 storage account, and a S1 app service plan.
Here's the json I'm using:
{
"type": "Microsoft.Web/Sites",
"apiVersion": "2020-06-01",
"name": "[parameters('function_app_csharp_name')]",
"location": "[variables('location')]",
"kind": "functionapp",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"enabled": true,
"httpsOnly": true,
"serverFarmId": "[concat(subscription().id, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('app_service_plan_name'))]",
"siteConfig": {
"alwaysOn": true,
"http20Enabled": true,
"minTlsVersion": "1.2",
"ftpsState": "Disabled",
"appSettings": [
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storage_account_name'), ';EndpointSuffix=', environment().suffixes.storage, ';AccountKey=',listKeys(concat(subscription().id, '/resourceGroups/', parameters('storage_accounts_resource_group'), '/providers/Microsoft.Storage/storageAccounts/', parameters('storage_account_name')), '2019-06-01').keys[0].value)]"
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~3"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('Microsoft.Insights/Components', parameters('app_insights_name')), '2020-02-02-preview').InstrumentationKey]"
},
{
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[reference(resourceId('Microsoft.Insights/Components', parameters('app_insights_name')), '2020-02-02-preview').ConnectionString]"
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "dotnet"
},
{
"name": "KEY_VAULT_NAME",
"value": "[parameters('keyvault_name')]"
}
]
}
}
}
Could you please assist in resolving this, and explain why this happens?