Reputation: 4405
When I try to deploy an Azure Function to the cloud using... func azure functionapp publish appName --build remote --publish-local-settings
...I receive the following error
Getting site publishing info...
Remote build is a new feature added to function apps.
Your function app appName does not support remote build as it was created before August 1st, 2019.
Please use '--build local' or '--build-native-deps'.
For more information, please visit https://aka.ms/remotebuild
EVEN THOUGH THE APP WAS LITERALLY JUST CREATED IN AZURE PORTAL.
System: - Running VS Code on Ubuntu 18.04
Steps to reproduce:
az cli
__init__.py
and configure local.settings.json
cd
to Function folderfunc azure functionapp publish appName --build remote --publish-local-settings
Tried so far:
- Substituting --build local
.
- Looks like it wants to work, but fails with error
There was an error restoring dependencies. ERROR: cannot install cryptography-2.9.2 dependency: binary dependencies without wheels are not supported when building locally. Use the "--build remote" option to build dependencies on the Azure Functions build server, or "--build-native-deps" option to automatically build and configure the dependencies using a Docker container. More information at https://aka.ms/func-python-publish
Not going to try:
- --build-local-deps
because I don't want a docker instance for my Function App
Please advise. This is painful at this point.
Upvotes: 3
Views: 4177
Reputation: 4673
In my case, I was provisioning an azurerm_linux_function_app
with terraform and got this error. The error turned out to be caused by me forgetting to specify the storage_account_access_key
setting. The docs even mention
One of storage_account_access_key or storage_uses_managed_identity must be specified when using storage_account_name.
But terraform does not actually check that when applying your configuration, resulting in a cryptic error message much later in the process.
Upvotes: 3
Reputation: 4405
Here is what was found today:
# Create a Function App Storage Account
az storage account create \
--name $fa_storage_name \
--resource-group $rg_name \
--access-tier Cool \
--default-action Deny \
--kind StorageV2 \
--subscription $az_sub
--location $az_loc \
--sku Standard_LRS
Changed this to...
# Create a Function App Storage Account
az storage account create \
--name $fa_storage_name \
--resource-group $rg_name \
--location $az_loc \
--sku Standard_LRS
...and was able to get past that error. The way I stumbled onto this was using the --buld local
flag. It gave me a MUCH MORE ACCURATE error. Something along the lines of Check your storage account dude.
(thank you Marcelo!)
Upvotes: 0