Azure Deploy
MicrosoftOfficialCreated by Microsoft
- Skill
- Workflow
- Cloud and DevOps
- MIT
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The azure-deploy skill manages the execution of cloud deployments for applications that have already been prepared and validated. It acts as the final stage in the deployment pipeline, ensuring that infrastructure and code are pushed to Azure using standardized recipes. The skill enforces strict prerequisites, requiring a validated deployment plan and a completed pre-deployment checklist to ensure success and minimize errors. It handles various deployment methods, including Azure Developer CLI (azd), Terraform, and Azure CLI, while providing built-in error recovery and post-deployment configuration steps.
What it does
- Executes deployment commands like azd up, azd deploy, and terraform apply.
- Verifies that the deployment plan is marked as Validated before proceeding.
- Performs pre-deployment health checks, including RBAC verification for managed identities.
- Configures post-deployment settings such as SQL managed identities and EF migrations.
- Provides verified, fully-qualified HTTPS endpoint URLs for the deployed application.
- Implements error recovery and verification steps based on specific deployment recipes.
When to use it
- When you need to push updates to an existing, already-prepared Azure deployment.
- When you have a project with an existing .azure/deployment-plan.md file.
- When you are ready to ship code to production after passing the azure-validate check.
- When you need to run standard deployment commands like azd up or az deployment.
Advantages
- Ensures deployment consistency by requiring a validated plan and pre-deploy checklist.
- Reduces deployment failures through automated RBAC health checks and error recovery.
- Standardizes post-deployment tasks like database migrations and identity configuration.
- Provides clear, actionable feedback with fully-qualified URLs for deployed services.
Usage examples
- “run azd up”
- The agent verifies the deployment plan status, completes the pre-deploy checklist, executes the deployment, and returns the HTTPS endpoint URLs.
- “push to production”
- The agent checks for a validated deployment plan, runs the appropriate deployment recipe, and confirms the application is live.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/azure-deploy/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip azure-deploy.zip -d .agents/skills
Documentation by Microsoft
Azure Deploy
AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE
PREREQUISITE: The azure-validate skill MUST be invoked and completed with status
ValidatedBEFORE executing this skill.
⛔ STOP — PREREQUISITE CHECK REQUIRED Before proceeding, verify BOTH prerequisites are met:
azure-prepare was invoked and completed →
.azure/deployment-plan.mdexistsazure-validate was invoked and passed → plan status =
ValidatedIf EITHER is missing, STOP IMMEDIATELY:
No plan? → Invoke azure-prepare skill first
Status not
Validated? → Invoke azure-validate skill first⛔ DO NOT MANUALLY UPDATE THE PLAN STATUS
You are FORBIDDEN from changing the plan status to
Validatedyourself. Only the azure-validate skill is authorized to set this status after running actual validation checks. If you update the status without running validation, deployments will fail.DO NOT ASSUME the app is ready. DO NOT SKIP validation to save time. Skipping steps causes deployment failures. The complete workflow ensures success:
azure-prepare→azure-validate→azure-deploy
Triggers
Activate this skill when user wants to:
Execute deployment of an already-prepared application (azure.yaml and infra/ exist)
Push updates to an existing Azure deployment
Run
azd up,azd deploy, oraz deploymenton a prepared projectShip already-built code to production
Deploy an application that already includes API Management (APIM) gateway infrastructure
Scope: This skill executes deployments. It does not create applications, generate infrastructure code, or scaffold projects. For those tasks, use azure-prepare.
APIM / AI Gateway: Use this skill to deploy applications whose APIM/AI gateway infrastructure was already created during azure-prepare. For creating or changing APIM resources, see APIM deployment guide. For AI governance policies, invoke azure-aigateway skill.
Rules
Run after azure-prepare and azure-validate
.azure/deployment-plan.mdmust exist with statusValidatedPre-deploy checklist required — Pre-Deploy Checklist
⛔ Destructive actions require
ask_user— global-rulesScope: deployment execution only — This skill owns execution of
azd up,azd deploy,terraform apply, andaz deploymentcommands. These commands are run through this skill's error recovery and verification pipeline.
Steps
| # | Action | Reference |
|---|---|---|
| 1 | Check Plan — Read .azure/deployment-plan.md, verify status = Validated AND Validation Proof section is populated | .azure/deployment-plan.md |
| 2 | Pre-Deploy Checklist — MUST complete ALL steps | Pre-Deploy Checklist |
| 3 | Load Recipe — Based on recipe.type in .azure/deployment-plan.md | recipes/README.md |
| 4 | RBAC Health Check — For Container Apps + ACR with managed identity: run azd provision --no-prompt, then verify AcrPull role has propagated before proceeding (see checklist) | Pre-Deploy Checklist — Container Apps RBAC |
| 5 | Execute Deploy — Follow recipe steps | Recipe README |
| 6 | Post-Deploy — Configure SQL managed identity and apply EF migrations if applicable | Post-Deployment |
| 7 | Handle Errors — See recipe's errors.md | — |
| 8 | Verify Success — Confirm deployment completed and endpoints are accessible | Verification |
| 9 | Live Role Verification — Query Azure to confirm provisioned RBAC roles are correct and sufficient | live-role-verification.md |
| 10 | Report Results — Present deployed endpoint URLs to the user as fully-qualified https:// links | Verification |
⛔ URL FORMAT RULE
When presenting endpoint URLs to the user, you MUST always use fully-qualified URLs with the
https://scheme (e.g.https://myapp.azurewebsites.net, notmyapp.azurewebsites.net). Many Azure CLI commands return bare hostnames without a scheme — always prependhttps://before presenting them.
⛔ VALIDATION PROOF CHECK
When checking the plan, verify the Validation Proof section (Section 7) contains actual validation results with commands run and timestamps. If this section is empty, validation was bypassed — invoke azure-validate skill first.
SDK Quick References
Azure Developer CLI: azd
Azure Identity: Python | .NET | TypeScript | Java
MCP Tools
| Tool | Purpose |
|---|---|
mcp_azure_mcp_subscription_list | List available subscriptions |
mcp_azure_mcp_group_list | List resource groups in subscription |
mcp_azure_mcp_azd | Execute AZD commands |
azure__role | List role assignments for live RBAC verification (step 9) |
References
Troubleshooting - Common issues and solutions
Post-Deployment Steps - SQL + EF Core setup
Files
- ATTRIBUTION.mdAdded by AutoGineer968 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md6.5 KiB
- references/auth-best-practices.md6.1 KiB
- references/global-rules.md1.2 KiB
- references/live-role-verification.md3.9 KiB
- references/pre-deploy-checklist.md18.4 KiB
- references/recipes/README.md431 B
- references/recipes/azcli/README.md1.7 KiB
- references/recipes/azcli/errors.md492 B
- references/recipes/azcli/verify.md2.0 KiB
- references/recipes/azd/README.md3.7 KiB
- references/recipes/azd/ef-migrations.md5.0 KiB
- references/recipes/azd/errors.md15.4 KiB
- references/recipes/azd/functions-deploy.md3.5 KiB
- references/recipes/azd/post-deployment.md4.2 KiB
- references/recipes/azd/scripts/apply-migrations.ps1Script1.8 KiB
- references/recipes/azd/scripts/apply-migrations.shScript1.8 KiB
- references/recipes/azd/scripts/grant-and-migrate.ps1Script4.2 KiB
- references/recipes/azd/scripts/grant-and-migrate.shScript4.3 KiB
- references/recipes/azd/sql-entra-auth.md2.5 KiB
- references/recipes/azd/sql-managed-identity.md7.4 KiB
- references/recipes/azd/verify.md4.9 KiB
- references/recipes/bicep/README.md2.4 KiB
- references/recipes/bicep/errors.md511 B
- references/recipes/bicep/verify.md763 B
- references/recipes/cicd/README.md1.2 KiB
- references/recipes/cicd/errors.md542 B
- references/recipes/cicd/examples/azdo-azd.yml487 B
- references/recipes/cicd/examples/azdo-multistage.yml831 B
- references/recipes/cicd/examples/github-azd.yml782 B
- references/recipes/cicd/examples/github-bicep.yml660 B
- references/recipes/cicd/verify.md754 B
- references/recipes/terraform/README.md3.2 KiB
- references/recipes/terraform/errors.md858 B
- references/recipes/terraform/verify.md752 B
- references/region-availability.md3.0 KiB
- references/sdk/azd-deployment.md792 B
- references/sdk/azure-identity-dotnet.md941 B
- references/sdk/azure-identity-java.md1.2 KiB
- references/sdk/azure-identity-py.md1.1 KiB
- references/sdk/azure-identity-ts.md1.1 KiB
- references/troubleshooting.md8.0 KiB
references/troubleshooting.md
Troubleshooting
This reference covers common errors encountered during Azure deployment with azd and how to resolve them.
Language Not Supported
Symptom: Error message like ERROR: error executing step command 'package --all': initializing service 'web', getting framework service: language 'html' is not supported by built-in framework services
Cause: Using unsupported language value in azure.yaml. Neither html nor static are valid language types for azd.
Solution:
For pure HTML/CSS static sites, omit the language field:
services:
web:
project: ./src/web # or . for root
host: staticwebapp
dist: . # relative to project path (only works when project != root)Valid language values: python, js, ts, java, dotnet, go (or omit for staticwebapp without build)
SWA Project Path Issues
Symptom: Deployment fails, gets stuck in "Uploading", or shows default Azure page
Cause: Incorrect project or dist configuration.
Solution: Match configuration to your project layout:
| Layout | project | dist |
|---|---|---|
| Static files in root | . | public (put files in public/ folder) |
| Framework in root | . | dist/build/out |
| Static in subfolder | ./src/web | . |
| Framework in subfolder | ./src/web | dist/build/out |
SWA CLI Limitation: When
project: ., you cannot usedist: .. Put static files in apublic/folder instead.
SWA Dist Not Found
Symptom: Error like dist folder not found or empty deployment
Cause: The dist path doesn't exist or build didn't run.
Solution:
For framework apps: ensure
language: jsis set to trigger buildVerify
distvalue matches your framework's output folderFor pure static in root: put files in
public/folder and usedist: publicFor pure static in subfolder: use
dist: .
Service Resource Not Found
Symptom: Error message like ERROR: getting target resource: resource not found: unable to find a resource tagged with 'azd-service-name: web'
Cause: The Azure resource is missing the azd-service-name tag that azd uses to link services defined in azure.yaml to deployed infrastructure.
Solution:
Add the tag to your bicep resource definition:
resource staticWebApp 'Microsoft.Web/staticSites@2022-09-01' = {
name: name
location: location
tags: union(tags, { 'azd-service-name': 'web' }) // Must match service name in azure.yaml
// ... rest of config
}After updating, run azd provision to apply the tag, then azd deploy.
Location Not Available for Resource Type
Symptom: Error message like LocationNotAvailableForResourceType: The provided location 'westus3' is not available for resource type 'Microsoft.Web/staticSites'
Cause: Azure Static Web Apps is not available in all regions.
Solution:
Change to a supported region:
azd env set AZURE_LOCATION westus2Available regions for Static Web Apps: westus2, centralus, eastus2, westeurope, eastasia
Missing Infrastructure Parameters
Symptom: Error message like ERROR: prompting for value: no default response for prompt 'Enter a value for the '<param>' infrastructure parameter:'
Cause: A Bicep parameter exists in your template but no corresponding environment variable is set.
Example: The infra/main.bicep has a parameter like:
@description('SKU for the storage account.')
param storageAccountSku stringSolution:
Check
infra/main.parameters.jsonfor an existing mapping to this parameter.If a mapping exists (e.g.,
"value": "${STORAGE_SKU}"), ask the user for the desired value and set the environment variable:
azd env set STORAGE_SKU <user-provided-value>If no mapping exists, add one to
infra/main.parameters.json:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountSku": {
"value": "${STORAGE_SKU}"
}
}
}⚠️ Warning:
main.parameters.jsonuses ARM JSON syntax. Do not use.bicepparamsyntax (using,param,readEnvironmentVariable()) in this file —azdwill fail with a JSON parse error.
Then ask the user for the desired value and set the environment variable:
azd env set STORAGE_SKU <user-provided-value>During azd provision, azd will substitute ${STORAGE_SKU} with the value from the environment and will pass it to Bicep.
Reference: Use environment variables in infrastructure files
.NET Aspire Limited Mode - Missing Environment Variables
Symptom: When deploying .NET Aspire projects with azd, azd provision succeeds but azd deploy fails with errors about missing container registry or managed identity environment variables.
Cause: .NET Aspire projects can use azd in "limited mode" where infrastructure is generated in-memory without creating an explicit infra/ folder on disk. In this mode, azd provision creates Azure resources (Container Registry, Managed Identity, Container Apps Environment, etc.) but doesn't automatically populate certain environment variables that azd deploy needs.
Common missing variables:
AZURE_CONTAINER_REGISTRY_ENDPOINT— ACR login server URLAZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID— Managed identity resource IDMANAGED_IDENTITY_CLIENT_ID— Managed identity client ID
Solution:
After azd provision completes, manually populate the missing environment variables:
# Get your resource group name first
azd env get-values
# Set the container registry endpoint
azd env set AZURE_CONTAINER_REGISTRY_ENDPOINT $(az acr list --resource-group <resource-group-name> --query "[0].loginServer" -o tsv)
# Set the managed identity resource ID
azd env set AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID $(az identity list --resource-group <resource-group-name> --query "[0].id" -o tsv)
# Set the managed identity client ID
azd env set MANAGED_IDENTITY_CLIENT_ID $(az identity list --resource-group <resource-group-name> --query "[0].clientId" -o tsv)PowerShell:
# Set the container registry endpoint
azd env set AZURE_CONTAINER_REGISTRY_ENDPOINT (az acr list --resource-group <resource-group-name> --query "[0].loginServer" -o tsv)
# Set the managed identity resource ID
azd env set AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID (az identity list --resource-group <resource-group-name> --query "[0].id" -o tsv)
# Set the managed identity client ID
azd env set MANAGED_IDENTITY_CLIENT_ID (az identity list --resource-group <resource-group-name> --query "[0].clientId" -o tsv)Then retry deployment:
azd deploy --no-promptContainer Apps — RBAC Propagation Timeout
Symptom: During azd up, infrastructure provisions successfully but the Container App revision creation times out (~900s). Container App shows provisioningState: Failed with no active revision.
Cause: The managed identity's AcrPull role assignment hasn't propagated before the Container App attempts to pull the image from ACR. Azure RBAC propagation can take 1–5 minutes.
Solution:
Verify the
AcrPullrole exists on the ACR for the Container App's managed identity (see AZD Errors — Container App Revision Timeout)If missing, assign it manually with
--assignee-principal-type ServicePrincipalWait 2–5 minutes for RBAC propagation before retrying
Set
AZURE_CONTAINER_REGISTRY_ENDPOINTenv varRun
azd deploy --no-prompt; if it still fails, wait a little longer and retry with backoff until propagation completes
Prevention:
Include
AcrPullrole assignment in Bicep withprincipalType: 'ServicePrincipal'Use
azd provision+azd deploy(separate steps) instead ofazd upto allow propagation time
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Medium risk
- Instructions that use the network
- Downloads piped into a shell
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-skills/skills/azure-deploy · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- microsoft/azure-skills
AutoGineer is not affiliated with or endorsed by Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-deploy.zip