Function app could not be changed back to built-in storage account
Published Jan 17 2022 05:38 PM 2,822 Views
Microsoft

For Function app Premium plan or Consumption plan running on windows, when you create function app it requires you to create a personal storage account and your application codes will be deployed to your personal storage account instead of platform file server built-in storage account.

 

Example:

Dennis411_0-1642469825779.png

 

 

 

 

When you create Function app dedicated plan running on windows, all of your application contents will be stored on file server which has been mounted to built-in storage account. 

 

Example:

 

Dennis411_1-1642469825792.png

 

 

 

 

Even though Dedicated plan function apps mounting to personal storage accounts are mentioned “not supported” by below documentation ,  but still some of the users are mounting Dedicated plan function apps to personal storage account by adding below two connections.  (it’s still allowed)

 

WEBSITE_CONTENTAZUREFILECONNECTIONSTRING

Only used when deploying to a Premium plan or to a Consumption plan running on Windows. Not supported for Consumptions plans running Linux. Changing or removing this setting may cause your function app to not start.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentazurefi...

 

 

WEBSITE_CONTENTSHARE

Only used when deploying to a Premium plan or to a Consumption plan running on Windows. Not supported for Consumptions plans running Linux. Changing or removing this setting may cause your function app to not start.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentshare

 

For example:

 

I added two values to my functionapp(Dedicated Plan) in order to mount to my personal storage account. 

 

Dennis411_2-1642469825882.png

 

 

Then functionapp mounted to my personal storage account.

 

Dennis411_3-1642469825890.png

 

In case environment is quite simple,  we can create new function app to resolve the issue. 

But If  we are aware of this is not supported environment and wants to recover back to platform file server built-in storage instead of recreating new function app.   How we change back ? 

 

  1. Staging slots are designed not to change back,  if need to change back,  delete all the slots , keep only production one.
  2. On Production one,  remove above two settings  -- >  Save -- >  Deploy your code to this production again -- >  see if it’s works or not. 
  3. If above method is not working,  it means that your current Production is not the original production when originally created but it is the original slot and swap to current production. 
  4. In this case,    
    • remove above two settings  -- >  Save.
    • Create new slot 
  5.  All the production settings will be copied
  6.  The new slot will be mounted to built-in storage.
    • Code Deployment to this new slot
    • Swap
    • Delete current slot (production before swap) after swap. 

We can use above way to change back to the platform file server built-in storage. 

 

Thanks for reading this post. I hope you enjoyed it. Please feel free to write your comments and views about the same over here.

Co-Authors
Version history
Last update:
‎Jan 17 2022 06:19 PM
Updated by: