Summary
azd only models the production slot of an App Service. There is no way to bind an azd service to a named deployment slot, so azd deploy <service> cannot target a slot.
What happens
We run a Python FastAPI "agent server" (server.py) in the agent deployment slot of our backend App Service. Running:
fails at the core deploy step with:
unable to find a resource tagged with azd-service-name: agent-server
because the only resource carrying that tag is the production site, not the slot.
Current workaround
A per-service predeploy hook (agent-server-predeploy.ts) does the deploy itself:
az acr build -> immutable tag dev-N.0.0
az webapp config container set --slot agent
- writes the immutable tag back to
.env so the next azd provision re-pins the slot (the Bicep default :dev tag drifts)
The azd deploy agent-server core step then becomes a tolerated no-op — all the real work is in the hook.
Ask
First-class named-slot support for the appservice host, e.g. a way in azure.yaml to declare that a service deploys to a specific slot, so azd deploy targets the slot natively. This would let us delete agent-server-predeploy.ts.
Context: encountered while deploying a multi-component AI/chat service (App Service + Function App + Logic App + Foundry hosted agent) end-to-end with azd provision/deploy in Azure/azure-sdk-tools tools/sdk-ai-bots/deployment. We currently work around this with a TypeScript hook.
Summary
azdonly models the production slot of an App Service. There is no way to bind anazdservice to a named deployment slot, soazd deploy <service>cannot target a slot.What happens
We run a Python FastAPI "agent server" (
server.py) in theagentdeployment slot of our backend App Service. Running:fails at the core deploy step with:
because the only resource carrying that tag is the production site, not the slot.
Current workaround
A per-service predeploy hook (
agent-server-predeploy.ts) does the deploy itself:az acr build-> immutable tagdev-N.0.0az webapp config container set --slot agent.envso the nextazd provisionre-pins the slot (the Bicep default:devtag drifts)The
azd deploy agent-servercore step then becomes a tolerated no-op — all the real work is in the hook.Ask
First-class named-slot support for the
appservicehost, e.g. a way inazure.yamlto declare that a service deploys to a specific slot, soazd deploytargets the slot natively. This would let us deleteagent-server-predeploy.ts.Context: encountered while deploying a multi-component AI/chat service (App Service + Function App + Logic App + Foundry hosted agent) end-to-end with
azdprovision/deploy in Azure/azure-sdk-toolstools/sdk-ai-bots/deployment. We currently work around this with a TypeScript hook.