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.

referencesrecipesazdfunctions-deploy.md

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

Azure Functions Deployment

Deployment workflows for Azure Functions using AZD.

Prerequisites

  • Azure Functions project prepared with azd template
  • azure.yaml exists and validated
  • .azure/deployment-plan.md status = Validated
  • Azure Functions Core Tools (optional, for local debugging or when using func commands outside azd workflows)

AZD Deployment

Full Deployment (Infrastructure + Code)

# Deploy everything
azd up --no-prompt

Infrastructure Only

# Provision infrastructure without deploying code
azd provision --no-prompt

Application Only

# Deploy code to existing infrastructure
azd deploy --no-prompt

Preview Changes

# Preview changes before deployment
azd provision --preview

Environment Configuration

Set AZD Environment Variables

These are for azd provisioning, not application runtime:

azd env set AZURE_LOCATION eastus2
azd env set VNET_ENABLED false

⚠️ Important: azd env set sets variables for the azd provisioning process, NOT application environment variables.

Verify Deployment

Check Function App Status

# Show deployment details
azd show

Testing HTTP Endpoints

⚠️ Never use curl -I (HEAD) to test Azure Functions endpoints.

Azure Functions [HttpTrigger] with "get" does not automatically handle HEAD requests. HEAD returns 404 from the routing layer even when GET works correctly, causing false-negative results and misdirected debugging.

✅ DO — Use GET with output suppression

# Check status code only (GET, don't follow redirects)
curl -s -o /dev/null -w "%{http_code}" "https://<func-name>.azurewebsites.net/api/<route>"

# Get status code and redirect URL
curl -s -o /dev/null -w "Status: %{http_code}\nRedirect: %{redirect_url}" "https://<func-name>.azurewebsites.net/api/<route>"

# Verbose output showing response headers (GET)
curl -sS -D - -o /dev/null "https://<func-name>.azurewebsites.net/api/<route>"

❌ DON'T — Use HEAD requests

# DO NOT use this — returns 404 even when the function works
curl -I "https://<func-name>.azurewebsites.net/api/<route>"

Monitoring

Monitor your Functions deployment through Azure Portal or use azd to view deployment status.

Common Issues

  1. Deployment timeout: Use azd up with appropriate timeout settings
  2. Missing dependencies: Ensure package.json/requirements.txt is correct and committed
  3. Function not appearing: Check azure.yaml service configuration
  4. Cold start issues: Consider Premium plan configuration in Bicep templates

CI/CD Integration

For automated deployments with azd, see cicd/README.md for GitHub Actions and Azure DevOps integration.

Data Loss Warning

⚠️ CRITICAL: azd down Data Loss Warning

azd down permanently deletes ALL resources in the environment, including:

  • Function Apps with all configuration and deployment slots
  • Storage accounts with all blobs and files
  • Key Vault with all secrets (use --purge to bypass soft-delete)
  • Databases with all data (Cosmos DB, SQL, etc.)

Best practices:

  • Always use azd provision --preview before azd up
  • Use separate environments for dev/staging/production
  • Back up important data before running azd down

Next Steps

After deployment:

  1. Verify functions are running
  2. Test endpoints
  3. Monitor Application Insights
  4. Set up alerts and monitoring

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.