AGENT SKILL

Azure 应用部署

azure-deploy

为已准备就绪(已存在 .azure/deployment-plan.md 和基础设施文件)的应用程序执行 Azure 部署。当用户要求创建新的应用程序时不要使用此技能——应改用 azure-prepare。此技能运行 azd up、azd deploy、terraform apply 和 az deployment 命令,并内置错误恢复。需要来自 azure-prepare 的 .azure/deployment-plan.md,以及来自 azure-validate 的已验证状态。适用场景:“运行 azd up”“运行 azd deploy”“执行部署”“推送到生产环境”“推送到云端”“上线”“发布”“bicep 部署”“terraform apply”“发布到 Azure”“在 Azure 上启动”。不适用场景:“创建并部署”“构建并部署”“创建新应用”“搭建基础设施”“使用 Terraform 创建并部署到 Azure”——这些请使用 azure-prepare。

适用职业SRE 工程师
License 许可
MIT
最近更新
2026-11-14
Stars
★ 1.6k
Forks
267

01 前言 Front Matter

name
azure-deploy
license
MIT
metadata
{ "author": "Microsoft", "version": "1.2.2" }
description
Execute 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, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.

02 资源文件 40

03 SKILL.md 正文

Azure Deploy

AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE

PREREQUISITE: The azure-validate skill MUST be invoked and completed with status Validated BEFORE executing this skill.

⛔ STOP — PREREQUISITE CHECK REQUIRED Before proceeding, verify BOTH prerequisites are met:

  1. azure-prepare was invoked and completed → .azure/deployment-plan.md exists
  2. azure-validate was invoked and passed → plan status = Validated

If 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 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.

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, or az deployment on a prepared project
  • Ship 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

  1. Run after azure-prepare and azure-validate
  2. .azure/deployment-plan.md must exist with status Validated
  3. Pre-deploy checklist required — Pre-Deploy Checklist
  4. ⛔ Destructive actions require ask_user — global-rules
  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.

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, not myapp.azurewebsites.net). Many Azure CLI commands return bare hostnames without a scheme — always prepend https:// 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

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

04 同仓库更多 Skills

microsoft
microsoft/azure-skills

azure-advisor-cost-optimization

Analyze Azure Advisor Cost/IdleResources findings and prevalidate deletion safety, including Service Groups. WHEN: "find unused Azure resources", "what resources am I paying for but no longer using", "idle-resource savings", "historical idle-resource savings", "are these idle resources safe to delete". Generic Cost, other subcategories, and cross-category requests use azure-advisor.

★ 1.6k
microsoft
microsoft/azure-skills

Python应用Azure App Service部署

python-appservice-deploy

将Python(Flask/Django/FastAPI)代码部署到Azure App Service Linux。适用场景:"Flask App Service"、"Django App Service"、"FastAPI App Service"、"将Python部署到App Service"。不适用于:Container Apps、Functions、非Python、Terraform/Bicep/IaC、完整基础设施——请使用 azure-prepare。

软件开发工程师部署与发布管理
★ 1.6k
microsoft
microsoft/azure-skills

Azure OpenAI模型最佳区域部署

preset

通过分析所有可用区域的容量,智能地将Azure OpenAI模型部署到最佳区域。自动先检查当前区域,并在必要时显示备选方案。适用于:快速部署、最佳区域、最优区域、自动区域选择、快速设置、多区域容量检查、高可用部署、部署到最佳位置。不适用于:自定义SKU选择(请使用 customize)、特定版本选择(请使用 customize)、自定义容量配置(请使用 customize)、PTU部署(请使用 customize)。

AI 工程师AI 平台资源管理
★ 1.6k
microsoft
microsoft/azure-skills

Azure OpenAI模型自定义部署

customize

Azure OpenAI模型的交互式引导部署流程,提供完全自定义控制。逐步选择模型版本、SKU(GlobalStandard/Standard/ProvisionedManaged)、容量、RAI策略(内容过滤器)以及高级选项(动态配额、优先处理、溢出)。适用于:自定义部署、自定义模型部署、选择版本、选择SKU、设置容量、配置内容过滤器、RAI策略、部署选项、详细部署、高级部署、PTU部署、预置吞吐量。不适用于:快速部署到最佳区域(请使用 preset)。

AI 工程师AI 平台资源管理
★ 1.6k
microsoft
microsoft/azure-skills

Azure OpenAI容量查询

capacity

发现跨区域和项目的可用 Azure OpenAI 模型容量。分析配额限制、比较可用性,并根据容量需求推荐最佳部署位置。USE FOR:查找容量、检查配额、可以在哪里部署、容量发现、容量最佳区域、多项目容量搜索、配额分析、模型可用性、区域比较、检查 TPM 可用性。DO NOT USE FOR:实际部署(发现后转交给预设或自定义技能)、配额提升请求(引导用户前往 Azure 门户)、列出现有部署。

AI 工程师AI 平台资源管理
★ 1.6k
microsoft
microsoft/azure-skills

Azure OpenAI模型部署

deploy-model

统一的 Azure OpenAI 模型部署技能,具备基于意图的智能路由。处理快速预设部署、完全自定义部署(版本/SKU/容量/RAI 策略)以及跨区域和项目的容量发现。USE FOR:部署模型、部署 gpt、创建部署、模型部署、部署 openai 模型、设置模型、配置模型、查找容量、检查模型可用性、可以在哪里部署、模型最佳区域、容量分析。DO NOT USE FOR:列出现有部署(使用 foundry_models_deployments_list MCP 工具)、删除部署、创建智能体(使用 agent/create)、创建项目(使用 project/create)。

AI 工程师AI 平台资源管理
★ 1.6k