$npx -y skills add microsoft/azure-skills --skill azure-deployExecute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply
| 1 | # Azure Deploy |
| 2 | |
| 3 | > **AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE** |
| 4 | > |
| 5 | > **PREREQUISITE**: The **azure-validate** skill **MUST** be invoked and completed with status `Validated` BEFORE executing this skill. |
| 6 | |
| 7 | > **⛔ STOP — PREREQUISITE CHECK REQUIRED** |
| 8 | > Before proceeding, verify BOTH prerequisites are met: |
| 9 | > |
| 10 | > 1. **azure-prepare** was invoked and completed → `.azure/deployment-plan.md` exists |
| 11 | > 2. **azure-validate** was invoked and passed → plan status = `Validated` |
| 12 | > |
| 13 | > If EITHER is missing, **STOP IMMEDIATELY**: |
| 14 | > - No plan? → Invoke **azure-prepare** skill first |
| 15 | > - Status not `Validated`? → Invoke **azure-validate** skill first |
| 16 | > |
| 17 | > **⛔ DO NOT MANUALLY UPDATE THE PLAN STATUS** |
| 18 | > |
| 19 | > You are **FORBIDDEN** from changing the plan status to `Validated` yourself. 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. |
| 20 | > |
| 21 | > **DO NOT ASSUME** the app is ready. **DO NOT SKIP** validation to save time. Skipping steps causes deployment failures. The complete workflow ensures success: |
| 22 | > |
| 23 | > `azure-prepare` → `azure-validate` → `azure-deploy` |
| 24 | |
| 25 | ## Triggers |
| 26 | |
| 27 | Activate this skill when user wants to: |
| 28 | - Execute deployment of an already-prepared application (azure.yaml and infra/ exist) |
| 29 | - Push updates to an existing Azure deployment |
| 30 | - Run `azd up`, `azd deploy`, or `az deployment` on a prepared project |
| 31 | - Ship already-built code to production |
| 32 | - Deploy an application that already includes API Management (APIM) gateway infrastructure |
| 33 | |
| 34 | > **Scope**: This skill executes deployments. It does not create applications, generate infrastructure code, or scaffold projects. For those tasks, use **azure-prepare**. |
| 35 | |
| 36 | > **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](https://learn.microsoft.com/azure/api-management/get-started-create-service-instance). For AI governance policies, invoke **azure-aigateway** skill. |
| 37 | |
| 38 | ## Rules |
| 39 | |
| 40 | 1. Run after azure-prepare and azure-validate |
| 41 | 2. `.azure/deployment-plan.md` must exist with status `Validated` |
| 42 | 3. **Pre-deploy checklist required** — [Pre-Deploy Checklist](references/pre-deploy-checklist.md) |
| 43 | 4. ⛔ **Destructive actions require `ask_user`** — [global-rules](references/global-rules.md) |
| 44 | 5. **Scope: deployment execution only** — This skill owns execution of `azd up`, `azd deploy`, `terraform apply`, and `az deployment` commands. These commands are run through this skill's error recovery and verification pipeline. |
| 45 | |
| 46 | --- |
| 47 | |
| 48 | ## Steps |
| 49 | |
| 50 | | # | Action | Reference | |
| 51 | |---|--------|-----------| |
| 52 | | 1 | **Check Plan** — Read `.azure/deployment-plan.md`, verify status = `Validated` AND **Validation Proof** section is populated | `.azure/deployment-plan.md` | |
| 53 | | 2 | **Pre-Deploy Checklist** — MUST complete ALL steps | [Pre-Deploy Checklist](references/pre-deploy-checklist.md) | |
| 54 | | 3 | **Load Recipe** — Based on `recipe.type` in `.azure/deployment-plan.md` | [recipes/README.md](references/recipes/README.md) | |
| 55 | | 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](references/pre-deploy-checklist.md#container-apps--acr--pre-deploy-rbac-health-check) | |
| 56 | | 5 | **Execute Deploy** — Follow recipe steps | Recipe README | |
| 57 | | 6 | **Post-Deploy** — Configure SQL managed identity and apply EF migrations if applicable | [Post-Deployment](references/recipes/azd/post-deployment.md) | |
| 58 | | 7 | **Handle Errors** — See recipe's `errors.md` | — | |
| 59 | | 8 | **Verify Success** — Confirm deployment completed and endpoints are accessible | [Verification](references/recipes/azd/verify.md) | |
| 60 | | 9 | **Live Role Verification** — Query Azure to confirm provisioned RBAC roles are correct and sufficient | [live-role-verification.md](references/live-role-verification.md) | |
| 61 | | 10 | **Rep |