Ability to suspend App Service Plans without charge
To save on costs, we want the ability to shut down an App Service Plan overnight while nobody is using it. We can shut down the Web App itself in an automated fashion, but the App Service Plan still charges us even through there are no running instances. Deleting and rebuilding the App Service and the App Service Plan is an option, but it is messy. Please consider not charging for periods where there are no running resources attached to the App Service Plan.
For the foreseeable future, the best way to achieve this is to use ARM templates to automate the creation/deletion process. From the Web App “create” panel you can download the ARM template for the web app.
Using Powershell RunBooks and saving the ARM templates in Azure storage: https://docs.microsoft.com/en-us/azure/automation/automation-deploy-template-runbook
Zoltán Lehóczky commented
Added idea stressing that a reduced charge (not no charge) would be suitable as well: https://feedback.azure.com/forums/169385-web-apps/suggestions/38194711-charge-less-for-app-services-in-stopped-state
Denis Bogunic commented
I'd like to second the comment that Dan left. This is not a solution to the posted question / request.
I urge you to reconsider this request , as the "destroy and recreate" option is incredibly messy when you are dealing with rather large scaled environments that have scheduled use-patterns.
A feature to suspend charging when no active app service is in a app service plan or a way to auto scale down and rescale up is urgently needed.
John Rappel commented
I created a solution that will work in many cases, but not all: https://github.com/jraps20/jrap-AzureVerticalScaling
It accounts for simple feature toggles: AlwaysOn, Enable32BitWorkerProcess and ClientCertEnabled. However, I did not address: slots, custom domains or SSLs.
You can follow along with the approach I took, by storing these properties in variables. It is likely possible to store variables for these remaining properties as well.
We know the best way currently is to destroy and recreate either manually or via templates; but that’s a poor response to what is actually wanted. Which is not to have to do that at all.
Tran Hoa commented
For our product development life cycle, we have 3 main environments: QA, UAT, Prod. Obviously, Prod environment is always on 24/24. QA or UAT is ON by demand. We want to reduce cost by suspending or "turning-off" service plan when not used. We cannot scale down to free tier plan due to we have many slots, custom domains & ssl also.
I think this feature is broadly welcomed by community.
Please help us to up-vote for fast release from Microsoft.
Has this been reviewed yet?
If you are using features of standard (i.e. slots, traffic manager and custom domains / ssl), it's difficult scaling down w/o manipulating your deployment. Then when you need the site "back on", you need to redo all these settings again.
Giovanni Bassi commented
You also can't scale down an app service plan for web app for containers. The ability to stop/suspend an app service plan is crucial. We can do it with VMs, why not with app service plans?
Actually, you can only scale down the App Service Plan if Always On is disabled.
Not on ASE you cant, you just more costs!