app config settings WEBSITE_CONTENTSHARE in function app deployment slots
Asked Answered
N

1

7

Do I have to set WEBSITE_CONTENTSHARE value in app settings when having multiple deployment slots? What does this value indicate? Can I provide some random values for WEBSITE_CONTENTSHARE in production and aging slots?

Nnw answered 15/4, 2022 at 22:34 Comment(0)
I
3

WEBSITE_CONTENTSHARE is used along with WEBSITE_CONTENTAZUREFILECONNECTIONSTRING which represents where the configurations are stored and the storage account where the function app code is stored.

Do I have to set WEBSITE_CONTENTSHARE value in app settings when having multiple deployment slots?

You do not need to set the WEBSITE_CONTENTSHARE setting in a deployment slot. This setting is generated for you when the app is created in the deployment slot.

What does this value indicate?

This represents the file path to the function app code and configuration.

Can I provide some random values for WEBSITE_CONTENTSHARE in production and aging slots?

According to this document "The WEBSITE_CONTENTSHARE setting must be provided and valid at creation time. An automated deployment that doesn't contain these settings results in a function app that won't run, even if the settings are added later."

NOTE:

  • This is available when deploying to a Windows or Linux Premium plan and Windows Consumption plan.

  • This is not supported in Linux Consumption plans and Windows and Linux Dedicated plans.

  • If you change or remove this option, your function app may not start.

REFERENCES:

  1. App settings reference for Azure Functions
  2. WEBSITE_CONTENTSHARE should not be used accroding to support
  3. Troubleshoot error: Azure Functions Runtime is unreachable
Impediment answered 16/4, 2022 at 4:10 Comment(4)
Fyi, when the function host's underlying storage account (AzureWebJobsStorage) network access is restricted, you do need to explicitly provide an existing share name in the deployment template.Winola
Hi I ran into this issue recently. We have been on the Premium plan for long time without setting WEBSITE_CONTENTSHARE or WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and no issues. But a recent new app can not run after deploying to Azure. Do you have any insights? I am not sure why this is happening nowRuvolo
@DaisyQL I'm in the same boat, premium plan but after doing a recent terraform deployment, we are having issues with some slots and while troubleshooting, I am getting references to the error of this post. Did you come to a solution?Hamal
hi @AnthonyKlotz unfortunately I did not figure it out myself. Oddly when my coworker manually created one in our prod environment, he dose not need to provide that configuration. It got me to think maybe it is because of the underline subscription or permission? Anyway, our org gave up on function app, it is too hard to maintainRuvolo

© 2022 - 2024 — McMap. All rights reserved.