Swap deployment slots from your terminal—azd already knows your app.
Azure App Service deployment slots let you stage changes and swap them into production with zero downtime. With azd, you can deploy to slots and now swap them—all in a single command.
What’s new?
The azure.appservice extension adds a swap command that detects your App Service, lists slots, and prompts you to pick source and destination. The extension installs automatically the first time you run it.
Why it matters
Slot swaps are key to zero-downtime deployments. This command keeps you in your terminal instead of context-switching to the portal. It integrates with your azd project—no extra configuration needed.
How to use it
Run azd appservice swap to start an interactive swap. With only one slot, it skips prompts and swaps directly with production.
For automation, specify everything upfront. Use @main to reference production:
azd appservice swap # Interactive
azd appservice swap --src staging --dst @main # Promote staging
azd appservice swap --src @main --dst staging # Rollback
azd appservice swap --service api --src staging --dst @main # Target a specific service
Feedback
Have ideas? File an issue on GitHub or sign up for user research.
This feature was introduced in PR #6687.
0 comments
Be the first to start the discussion.