Build App Service deployment slot configurations with sticky settings and traffic routing.
Last verified: May 2026
Build App Service deployment slot configurations with sticky settings, traffic routing, and auto-swap.
Required Fields
appNameslotNamesiteConfigappSettingsOutput will appear here...Azure App Service deployment slots enable zero-downtime deployments by letting you deploy to a staging slot, validate the deployment, and then swap it into production. Slots share the same App Service Plan but can have independent configurations — app settings, connection strings, managed identity assignments, and custom domains. Configuring slots requires understanding which settings are slot-sticky (remain with the slot during swap) versus which travel with the code. The Slot Config Builder helps you design slot configurations with correct sticky settings, auto-swap rules, and pre-swap warm-up paths.
Your team is implementing zero-downtime deploys for a customer-facing web app. The builder generates a 2-slot setup (production + staging) with: connection strings to a staging DB marked slot-sticky, custom domain routing 5% of traffic to staging for canary, warm-up path /healthz that hits 3 critical endpoints, manual swap approval. After deploy, the team validates the staging slot at 5% traffic for 30 minutes before swapping. Production deploys went from 'risky weekend events' to 'routine Tuesday afternoons' with measurably lower incident rates.
The most-misused setting is making EVERY app setting slot-sticky. If staging swaps to production carrying its own connection strings, the new prod code uses staging's database — and writes to it. Only mark TRULY environment-specific settings as sticky (DB connections, env-specific API endpoints). Behavior config that should travel with code stays non-sticky.
Pre-warm the staging slot BEFORE the swap by hitting a custom warm-up path. Add a `WEBSITE_SWAP_WARMUP_PING_PATH=/warmup` setting and implement an endpoint that pre-loads caches and JIT-compiles common code paths. Without this, the swap completes but the first 30+ seconds of production traffic hits cold instances.
Auto-swap is dangerous in practice. It promotes staging to prod after deploy succeeds — but 'deploy succeeded' just means the build artifact uploaded, not that the app works. Always require manual approval after explicit smoke tests, even if it means an extra step in the pipeline.
The builder constructs deployment slot configurations across three concerns: which app settings are slot-sticky vs. slot-traveling, auto-swap behavior, and warm-up settings. Output includes az webapp deployment slot create + config commands, the explicit list of sticky setting names for the slot config, and Terraform azurerm_app_service_slot resources.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.