Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
331 stars 57 forks source link

Ability to "stop" Static Web App #503

Open jshinevar opened 3 years ago

jshinevar commented 3 years ago

I would like the ability to shut off my static web app if needed. This would be good for testing purposes. Other Web Apps and Functions have the ability to turn off the resource, it would be useful for Static Web Apps as well.

jshinevar commented 3 years ago

For further context, I was looking into how to do this, and I had found this SO: https://stackoverflow.com/questions/63516777/how-to-shut-down-an-azure-static-web-app I'm not the first one to look for this.

anthonychu commented 3 years ago

Also requested here but for a different reason #137

jshinevar commented 3 years ago

I saw that one was closed, so I was appealing to the team for this feature

anthonychu commented 3 years ago

@jshinevar Thanks. I was adding a link to that issue so anyone landing on that will find this one.

Can you share more about your expectations for what happens when an app is stopped? For instance, would you expect billing to stop (for standard)? Do you still want to be able to deploy to the app?

jshinevar commented 3 years ago

Ok, the scenario I am trying to build is as follows. I have worked on several platforms (i.e SalesForce, Wordpress, etc) that have an external domain name that just points to an internal IP. Sometimes those internal IP's will change and if you are using your own DNS or something not internal, that will not update automatically. I want to build a solution with UpTime Robot that will monitor a website and if it goes down uses an Azure function to identify the internal IP and update your external DNS.

As I was testing some stuff out I figured I would just use my personal static website to test out some functionality. That is when I realized that I couldn't turn off my site to force a down situation.

I may be trying to do something fairly odd, but I can only imagine that there would be a need to turn off a static website. Consider the following, what if a website became compromised and defaced. I imagine someone would want to turn it off. Yes, they would want to still deploy to it.

In my opinion a static site that is shut off would still need to pay storage costs, but it probably shouldn't have other costs.

Xriuk commented 1 year ago

Indeed this feature is much needed.

Can you share more about your expectations for what happens when an app is stopped? For instance, would you expect billing to stop (for standard)? Do you still want to be able to deploy to the app?

I think it should work the same as with regular Web Apps, respond with an HTTP error code but still allow deploying, editing configuration

jshinevar commented 1 year ago

I feel that file storage charges continue as normal, but allow us to stop routing requests. There has to be some sort of service/server that is handling the routing.

st0w commented 1 year ago

It is laughable that this still does not exist on Azure. Why in the world would people need to submit an enhancement request and justify expectations for stopping a web app service? There are plenty of reasons this might need to be done, and this is a basic feature of any web serving provider.

jakesant commented 7 months ago

I really can't fathom how such a basic, essential feature still isn't implemented years down the line.