Justin Lavertu
Justin Lavertu

Reputation: 51

Is there a way to deploy a "Stopped" function app?

I'm deploying an Azure Function App and we are deploying to EastUS and WestUS. I want to completely stop the app in EastUS. Is there a way to do this within an ARM template?

I am currently stopping just our main triggering function by adding AzureWebJobs.<TriggerFunction>.Disabled=false in our ARM template, but that only disables one of our 5 functions in that app. I would like to completely stop the app, or deploy it in a stopped state, and all functions within it for our EastUS deploy.

My other option is to add 4 more rows for each other function in the app but it still leaves the app running, which we do not want.

Thanks

Upvotes: 5

Views: 1431

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222582

As per your comment, you need to use az functionapp stop --name MyFunctionApp --resource-group MyResourceGroup with your task in the pipeline. As a fix, you can move the task above the deployment step in order to stop the function app before you start to deploy.

Upvotes: 1

Related Questions