az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
Cannot create slot for Function app. Following error is returned.
"Function App app settings are not expected to be empty. Please try again with WEBSITE_CONTENTAZUREFILECONNECTIONSTRING as a storage account connection string"
To Reproduce
Just execute this command
az webapp deployment slot create --name
Expected behavior
Slot should be created successfully for function app.
Environment summary
Additional context
Add any other context about the problem here.
@ankitkumarr this is the bug from the CRI - if you have an existing bug please link the bugs.
馃憤
I am also experiencing this issue.
I am using an Azure Function runtime version ~2. Following the Terraform example here: https://vgaltes.com/post/deploying-azure-functions-using-slots/
I was able to confirm I see the same issue as stated by @exc3eed above when running the az webapp deployment slot create command. Adding the storage account connection string doesn't seem to change the exception thrown:
Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Function App app settings are not expected to be empty. Please try again with WEBSITE_CONTENTAZUREFILECONNECTIONSTRING as a storage account connection string.
@Chedberg84 az webapp should not be used for functionapp - the az functionapp * commands should be used for functionapp & slots creation for functionapp is not currently supported.
Hello,
Is this on track to be deployed on May 15th?
Thanks
We are still working on this, unfortunately the support for slots in the create command will not be out by May 15th
any idea when this will be available?
We will start working in the near future, we still do not have a concrete ETA yet
We have started the work https://github.com/Azure/azure-cli/pull/9550. It should be completed in Sprint 63 (Official Release: 6/18/2019).
This can be closed @ahmedelnably. Work was completed and released.
BUG!
az functionapp deployment slot create
It is clone all settings from main function. Including variable WEBSITE_CONTENTSHARE
So it leads to deploy to same function.
In Azure Portal it generate random WEBSITE_CONTENTSHARE variable based on function name.
@rerime thanks for reporting the issue, we will be fixing that in the next release
Thanks to @ankitkumarr the fix is addressed in https://github.com/Azure/azure-cli/pull/9731
Most helpful comment
@Chedberg84 az webapp should not be used for functionapp - the az functionapp * commands should be used for functionapp & slots creation for functionapp is not currently supported.