All skills
microsoft avatar

/azure-deploy

@d0c21c0 official

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.

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/azure-deploy

This session only. Nothing lands on disk.

referencesrecipesazdREADME.md

≈957 tokens on demand. Your agent reads this file only when SKILL.md points to it.

AZD Deploy Recipe

Deploy to Azure using Azure Developer CLI (azd).

💡 Note: azd supports both Bicep and Terraform as IaC providers. The deployment workflow is identical regardless of which you use.

Prerequisites

  • azd CLI installed → Run mcp_azure_mcp_extension_cli_install with cli-type: azd if needed
  • .azure/deployment-plan.md exists with status Validated
  • azure.yaml exists and validated
  • Infrastructure files exist (Bicep: infra/main.bicep, Terraform: infra/*.tf)
  • AZD environment configured → Done in azure-validate
  • Subscription and location confirmed → See Pre-deploy Checklist

Workflow

Step Task Command
1 Verify environment azd env get-values — Confirm AZURE_SUBSCRIPTION_ID and AZURE_LOCATION set
2 Provision infrastructure azd provision --no-prompt
3 RBAC health check (Container Apps + ACR only) After provisioning, verify AcrPull role has propagated before deploying — see Pre-Deploy Checklist
4 Deploy application azd deploy --no-prompt
5 Post-Deploy Post-Deployment Steps — If using SQL + managed identity
6 Verify See Verification
7 Report Present deployed endpoint URLs to the user — see Verification Step 3

⚠️ Important: For Container Apps that use a managed identity to pull from ACR, always run azd provision and azd deploy as separate steps (not azd up) and complete the RBAC health check between them. This ensures the managed identity AcrPull role assignment has propagated before the Container App revision attempts to pull the image.

⚠️ Important: For .NET Aspire projects or projects using azd "limited mode" (no explicit infra/ folder), verify that azd provision populated all required environment variables. If azd deploy fails with errors about missing AZURE_CONTAINER_REGISTRY_ENDPOINT, AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID, or MANAGED_IDENTITY_CLIENT_ID, see Error Handling for the resolution.

Common Mistakes

❌ Wrong Why It Fails
azd up --location eastus2 --location is not a valid flag for azd up
azd up without azd env new Prompts for input, fails with --no-prompt
mkdir .azure then azd env new --no-prompt Creates env folder structure incorrectly
Setting AZURE_LOCATION without checking RG "Invalid resource group location" if RG exists elsewhere
Ignoring azd-service-name tag conflicts in same RG "found '2' resources tagged with..." error
language: html or language: static Not valid - use language: js with dist: . for static sites

Deployment Commands

⚠️ azd up takes 5-15 min. Run with output streamed visibly to the user — do NOT run silently or suppress output. The user must see provisioning progress in real time.

Full Deployment

Provisions infrastructure AND deploys application:

azd up --no-prompt

Infrastructure Only

azd provision --no-prompt

Application Only

Deploy code to existing infrastructure:

azd deploy --no-prompt

Single Service

azd deploy api --no-prompt

References

Source: SKILL.md on GitHub

1 alert16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides comprehensive instructions and scripts for executing Azure deployments using various tools like the Azure Developer CLI (azd), Terraform, and Bicep. It includes several security considerations, such as the execution of deployment commands and the use of external scripts for database migrations. These operations are essential to the skill's intended purpose and are accompanied by extensive safety guidance, including the implementation of managed identities and mandatory user confirmation for destructive actions.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    21/36 files flagged

Signed by skilld at d0c21c0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 months ago
metadata
{
  "author": "Microsoft",
  "version": "0.0.0-placeholder"
}

README badge

README badge for microsoft/github-copilot-for-azure/azure-deploy

Executes Azure deployments for applications with prepared infrastructure and validated deployment plans, running azd up, azd deploy, terraform apply, and az deployment commands with error recovery. Use this skill only after azure-prepare and azure-validate have completed — it does not create applications or infrastructure, only deploys them.

Generated from the current SKILL.md.

What prerequisites must be met before using this skill?
The azure-prepare skill must have completed (creating .azure/deployment-plan.md and infrastructure files) and the azure-validate skill must have run and confirmed status as 'Validated'. If either is missing, invoke those skills first.
Can I use this skill to create a new application?
No. This skill executes deployments for already-prepared applications only. Use the azure-prepare skill to create new applications or set up infrastructure.
What deployment methods does this skill support?
The skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery.
What happens if validation status is not 'Validated'?
The skill will not proceed. You must invoke azure-validate first and ensure the Validation Proof section in .azure/deployment-plan.md is populated with actual validation results.
Does this skill handle post-deployment configuration?
Yes. It configures SQL managed identity and applies Entity Framework migrations if applicable, following the post-deployment steps for the selected recipe.

Generated from the current SKILL.md. These answers refresh after source changes.