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.

referenceslive-role-verification.md

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

Live Role Verification

Query Azure to confirm that provisioned RBAC role assignments are correct and sufficient for the application to function. This complements the static role check in azure-validate by validating live Azure state.

How It Differs from azure-validate's Role Check

Check Skill What It Verifies
Static azure-validate Generated Bicep/Terraform has correct role assignments in code
Live azure-deploy (this) Provisioned Azure resources actually have the right roles assigned

Both checks are needed because:

  • Bicep may be correct but provisioning could fail silently for roles
  • Manual changes or policy enforcement may alter role assignments
  • Previous deployments may have stale or conflicting roles

When to Run

After deployment verification (step 7). Resources are now provisioned, so live role assignments can be queried.

Verification Steps

1. Identify App Identities

Read .azure/deployment-plan.md to find all services with managed identities. Then query Azure for their principal IDs:

# App Service
az webapp identity show --name <app-name> -g <resource-group> --query principalId -o tsv

# Container App
az containerapp identity show --name <app-name> -g <resource-group> --query principalId -o tsv

# Function App
az functionapp identity show --name <app-name> -g <resource-group> --query principalId -o tsv

2. Query Live Role Assignments

Use MCP tools to list role assignments for each resource and identity (using the principalId from step 1):

azure__role(
  command: "role_assignment_list",
  scope: "<resourceId>",
  assignee_object_id: "<principalId>"
)

Or via CLI:

az role assignment list --scope <resourceId> --assignee-object-id <principalId> --output table

3. Cross-Check Against Requirements

For each identity, verify the assigned roles match what the app needs:

App Operation Expected Role Scope
Read/write blobs Storage Blob Data Contributor Storage account
Generate user delegation SAS Storage Blob Delegator Storage account
Read secrets Key Vault Secrets User Key Vault
Send messages Azure Service Bus Data Sender Service Bus namespace
Read/write documents Cosmos DB Built-in Data Contributor Cosmos DB account

4. Check for Common Issues

Issue How to Detect Fix
Role assigned at wrong scope Role on resource group but needed on specific resource Reassign at resource scope
Generic role instead of data role Contributor assigned but no data-plane access Replace with data-plane role (e.g., Storage Blob Data Contributor)
Missing role entirely No assignment found for identity on target resource Add role assignment to Bicep and redeploy
Stale role from previous deployment Old principal ID with roles, new identity without Clean up old assignments, add new ones

Decision Tree

Resources provisioned?
├── No → Skip live check (nothing to query yet)
└── Yes → For each app identity:
    ├── Query role assignments on target resources
    ├── Compare against expected roles from plan
    │   ├── All roles present and correct → ✅ Pass
    │   ├── Missing roles → ❌ Fail — add to Bicep, redeploy
    │   └── Wrong scope or generic roles → ⚠️ Warning — fix and redeploy
    └── Record results in deployment verification

Record in Deployment Verification

Add live role verification results to the deployment log in .azure/deployment-plan.md:

### Live Role Verification
- Command: `az role assignment list --scope <resourceId> --assignee-object-id <principalId>`
- Results:
  - <identity> → <role> on <resource> ✅
  - <identity> → missing <expected-role> on <resource> ❌
- Status: Pass / Fail

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.