Reputation: 111
I can note that some of the deployment slots settings of Azure app services can be swapped, but others cannot be swapped. Do you know why?
Upvotes: 0
Views: 469
Reputation: 220
We have a number of feature requests in UserVoice for settings to remain sticky to slots and have plans to work on a few of them. Feel free to add your support to the one you're interested in: https://feedback.azure.com/forums/169385-web-apps
Upvotes: 0
Reputation: 15571
First we should understand that slots are primarily meant to be used to deploy new versions of a website real quick. Running (for instance) a staging environment on a slot is not recommended.
These are the settings that, according to the documentation, don't get swapped:
- Publishing endpoints
- Custom Domain Names
- SSL certificates and bindings
- Scale settings
- WebJobs schedulers
If any of these would be swapped, that would mean that your application would break. In more ways than one.
For instance, you would have to change the publishing endpoints for your deployments, since they would have swapped with the slots. This means updating your CI/CD environment every time you swap slots.
The custom domain name that is connected to your production slot would now point to the secondary slot, rendering the swap useless. Because your domain still points to the old version!
If someone managed to reach the new version (which would be hard because the custom domain name still points to the other slot), the SSL certificate (and binding) wouldn't be there. Image that happening to a website that provides a HSTS header.
You can name at least one good reason for each of these settings to not be swapped when swapping slots.
Upvotes: 2