{"id":3588,"date":"2026-02-11T06:59:15","date_gmt":"2026-02-11T14:59:15","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=3588"},"modified":"2026-02-17T10:06:53","modified_gmt":"2026-02-17T18:06:53","slug":"azd-app-service-slot","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/azd-app-service-slot\/","title":{"rendered":"Deploy to Azure App Service deployment slots with azd"},"content":{"rendered":"<h1>Deploy to Azure App Service slots with azd deploy<\/h1>\n<p><em>Missed deploying to an App Service slot? Now you can\u2014without workarounds or manual scripts.<\/em><\/p>\n<hr \/>\n<h2>What&#8217;s new?<\/h2>\n<p>Before, <code>azd deploy<\/code> could only deploy to the default production slot. Now, <code>azd<\/code> understands the slots you define in Bicep and deploys to the slot you designate. On first deploy, <code>azd<\/code> deploys to both production and any defined slots. After that, if you have more than one slot, it prompts you to choose\u2014or you can set the slot with an environment variable.<\/p>\n<h2>Why it matters<\/h2>\n<p>Slot deployment is essential for blue\/green, staging, and testing flows, but it wasn&#8217;t possible from <code>azd<\/code> before. Now, you can go from Bicep definition to deploying code to a slot\u2014no extra scripts, extensions, or guessing where your code lands. It&#8217;s a smoother, more predictable experience using just <code>azd<\/code>.<\/p>\n<h2>How to use it<\/h2>\n<ol>\n<li>Define a slot in your Bicep:\n<pre><code class=\"language-bicep\">resource webApp 'Microsoft.Web\/sites@2021-03-01' = {\r\n  name: 'my-appservice'\r\n  location: resourceGroup().location\r\n  kind: 'app'\r\n  properties: { serverFarmId: myPlan.id }\r\n}\r\nresource stagingSlot 'Microsoft.Web\/sites\/slots@2021-03-01' = {\r\n  name: '${webApp.name}\/staging'\r\n  location: webApp.location\r\n  properties: {}\r\n}<\/code><\/pre>\n<p>Or with Azure Verified Modules (AVM):<\/p>\n<pre><code class=\"language-bicep\">module appservice 'br\/public:app-service:1.3.2' = {\r\n  name: 'my-appservice'\r\n  params: {\r\n    \/\/ ...params\r\n  }\r\n}\r\nmodule stagingSlot 'br\/public:web-app-deployment-slot:1.0.2' = {\r\n  name: 'staging'\r\n  params: { appServiceName: appservice.outputs.name }\r\n}<\/code><\/pre>\n<blockquote><p><strong>Note:<\/strong> Deployment slots require an App Service plan at <strong>Standard (S1)<\/strong> tier or higher. The Free, Shared, and Basic tiers do not support slots.<\/p><\/blockquote>\n<\/li>\n<li>Provision and deploy with <code>azd<\/code>:\n<pre><code class=\"language-sh\">azd up<\/code><\/pre>\n<ul>\n<li>Get prompted if you have multiple slots<\/li>\n<li>Or skip the prompt by setting: <code>azd env set AZD_DEPLOY_MYAPI_SLOT_NAME staging<\/code><\/li>\n<li>Works in CI\/CD too\u2014just set the env var in your pipeline.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2>Feedback<\/h2>\n<p>Questions or ideas? <a href=\"https:\/\/github.com\/Azure\/azure-dev\/issues\">File an issue<\/a> or <a href=\"https:\/\/github.com\/Azure\/azure-dev\/discussions\">chat on GitHub<\/a>. Want to help shape <code>azd<\/code>&#8216;s future? <a href=\"https:\/\/aka.ms\/azd-user-research-signup\">Sign up for user research<\/a>.<\/p>\n<hr \/>\n<p><em>Introduced in <a href=\"https:\/\/github.com\/Azure\/azure-dev\/pull\/6627\">PR #6627<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>azd now supports direct deployments to Azure App Service slots\u2014quick, clear, and slot-aware for the first time.<\/p>\n","protected":false},"author":111321,"featured_media":3595,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[908,864],"class_list":["post-3588","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-azd","tag-azure-developer-cli"],"acf":[],"blog_post_summary":"<p>azd now supports direct deployments to Azure App Service slots\u2014quick, clear, and slot-aware for the first time.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3588","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/111321"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=3588"}],"version-history":[{"count":2,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3588\/revisions"}],"predecessor-version":[{"id":3590,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3588\/revisions\/3590"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/3595"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=3588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=3588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=3588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}