Reputation: 6157
I have an Azure Functions App running on a consumption plan. It was handed over to me without any app settings. I manually setup the app settings using the Microsoft documentation as follows:
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "{id}",
"slotSetting": false
},
{
"name": "AzureWebJobsStorage",
"value": "DefaultEndpointsProtocol=https;AccountName={name};AccountKey={key}",
"slotSetting": false
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~2",
"slotSetting": false
},
{
"name": "FUNCTIONS_WORKER_RUNTIME",
"value": "dotnet",
"slotSetting": false
},
{
"name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "DefaultEndpointsProtocol=https;AccountName={name};AccountKey={key}",
"slotSetting": false
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "{name of Functions App added to 32 chars}",
"slotSetting": false
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "10.14.1",
"slotSetting": false
},
{
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1",
"slotSetting": false
}
]
Where the connection strings both share the same Storage Account that is otherwise empty and not in use by any other application.
It however yields an error already when trying to view it from the portal. Removing the WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
, WEBSITE_CONTENTSHARE
and AzureWebJobsStorage
seem to make it run although no host keys are saved, but otherwise functions seem to trigger.
How do I properly setup the Functions App to use the Storage?
Upvotes: 2
Views: 1242
Reputation: 60711
By creating a new function app and comparing the settings that are created to your current settings, you will be able to identify the differences.
Upvotes: 2
Reputation: 18526
I have observed this issue when you create a function app without any app settings (e.g. via ARM). It will have the functions runtime v1 by default.
You can try switching the runtime version manually via the portal.
https://learn.microsoft.com/en-us/azure/azure-functions/set-runtime-version
Although the runtime version is determined by the FUNCTIONS_EXTENSION_VERSION setting, you should make this change in the Azure portal and not by changing the setting directly. This is because the portal validates your changes and makes other related changes as needed.
If this does not help, you will need to recreate it completely with basic app settings already in place (mainly FUNCTIONS_EXTENSION_VERSION
being set to ~2
).
Unfortunately, I don't remember if there was an open Github issue for it - you could also post your issue there:
https://github.com/Azure/azure-functions-host/issues
It might be that your app works even though an error is shown in the Azure Portal - but I would recommend recreating it in this case.
Upvotes: 1