I have an azure premium function which I want deployed to a storage account which is protected via vnet. I have followed this guide: https://learn.microsoft.com/en-us/azure/azure-functions/configure-networking-how-to#restrict-your-storage-account-to-a-virtual-network and it works fine.
I now want to add slots to the template to allow me to hot swap the deployment in live
If I deploy the arm template with slots added (but no configuration specified for the slot at all, so it should get all the app settings from production) I can see it's changed WEBSITE_CONTENTSHARE
in the staging slot by adding 2452965d
as shown below:
I can't actually deploy to the slot now without manually creating the share ***-dev-2452965d
in the storage account (previously to deploy without a slot I needed to create the share ***-dev
so this isn't a surprise.
It will then correctly deploy the app to the slot.
Where things fail now is trying to swap the deployment. Clicking swap in the portal gives this error:-
Failed to complete swap between slot 'staging' and slot 'production'. Error: {"_body":"{"Code":"InternalServerError","Message":"There was an unexpected error swapping slots 'staging' and 'production' for site '***-dev(staging)'. Please try to cancel your swap operation
I'm guessing this error is because the storage account is behind a vnet and I still need to manually create the shares or manipulate them in someway but can't. I'm at a loss if there is a way to make this work.
I asked Microsoft this:
And they replied with:
So it's just not supported, nor documented anywhere sadly.