azure-devopsazure-web-app-serviceazure-resource-managerazure-bicepazure-deployment

Bicep Deployments to AppService Clears zip/Deployment Center Deployments


I am deploying an AppService environment via Bicep. Everything is working well and is configured exactly as desired.

However, I have noticed that if I redeploy a Bicep template after I have deployed my AppService contents (via ZIP deployment using Azure DevOps), it completely clears all Deployment Center deployments, rendering an empty/default AppService.

Is there a way to stop this from happening? I would prefer to retain the AppService deployed contents and keep them intact.


Solution

  • I finally figured out this issue, and it was a tricky one. The problem was that the WEBSITE_RUN_FROM_PACKAGE environmental variable was not set. I was thinking that DevOps would be responsible for setting this, and it does. However, when the Bicep deployment executes and this property is not part of the configured settings (and I do not merge them with existing values) it gets erased.