{"id":"cda4244f-75f0-4727-acf9-ce3750e185cc","shortId":"dFvKKZ","kind":"skill","title":"Azure Deployment Preflight","tagline":"Awesome Copilot skill by Github","description":"# Azure Deployment Preflight Validation\n\nThis skill validates Bicep deployments before execution, supporting both Azure CLI (`az`) and Azure Developer CLI (`azd`) workflows.\n\n## When to Use This Skill\n\n- Before deploying infrastructure to Azure\n- When preparing or reviewing Bicep files\n- To preview what changes a deployment will make\n- To verify permissions are sufficient for deployment\n- Before running `azd up`, `azd provision`, or `az deployment` commands\n\n## Validation Process\n\nFollow these steps in order. Continue to the next step even if a previous step fails—capture all issues in the final report.\n\n### Step 1: Detect Project Type\n\nDetermine the deployment workflow by checking for project indicators:\n\n1. **Check for azd project**: Look for `azure.yaml` in the project root\n   - If found → Use **azd workflow**\n   - If not found → Use **az CLI workflow**\n\n2. **Locate Bicep files**: Find all `.bicep` files to validate\n   - For azd projects: Check `infra/` directory first, then project root\n   - For standalone: Use the file specified by the user or search common locations (`infra/`, `deploy/`, project root)\n\n3. **Auto-detect parameter files**: For each Bicep file, look for matching parameter files:\n   - `<filename>.bicepparam` (Bicep parameters - preferred)\n   - `<filename>.parameters.json` (JSON parameters)\n   - `parameters.json` or `parameters/<env>.json` in same directory\n\n### Step 2: Validate Bicep Syntax\n\nRun Bicep CLI to check template syntax before attempting deployment validation:\n\n```bash\nbicep build <bicep-file> --stdout\n```\n\n**What to capture:**\n- Syntax errors with line/column numbers\n- Warning messages\n- Build success/failure status\n\n**If Bicep CLI is not installed:**\n- Note the issue in the report\n- Continue to Step 3 (Azure will validate syntax during what-if)\n\n### Step 3: Run Preflight Validation\n\nChoose the appropriate validation based on project type detected in Step 1.\n\n#### For azd Projects (azure.yaml exists)\n\nUse `azd provision --preview` to validate the deployment:\n\n```bash\nazd provision --preview\n```\n\nIf an environment is specified or multiple environments exist:\n```bash\nazd provision --preview --environment <env-name>\n```\n\n#### For Standalone Bicep (no azure.yaml)\n\nDetermine the deployment scope from the Bicep file's `targetScope` declaration:\n\n| Target Scope | Command |\n|--------------|---------|\n| `resourceGroup` (default) | `az deployment group what-if` |\n| `subscription` | `az deployment sub what-if` |\n| `managementGroup` | `az deployment mg what-if` |\n| `tenant` | `az deployment tenant what-if` |\n\n**Run with Provider validation level first:**\n\n```bash\n# Resource Group scope (most common)\naz deployment group what-if \\\n  --resource-group <rg-name> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n\n# Subscription scope\naz deployment sub what-if \\\n  --location <location> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n\n# Management Group scope\naz deployment mg what-if \\\n  --location <location> \\\n  --management-group-id <mg-id> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n\n# Tenant scope\naz deployment tenant what-if \\\n  --location <location> \\\n  --template-file <bicep-file> \\\n  --parameters <param-file> \\\n  --validation-level Provider\n```\n\n**Fallback Strategy:**\n\nIf `--validation-level Provider` fails with permission errors (RBAC), retry with `ProviderNoRbac`:\n\n```bash\naz deployment group what-if \\\n  --resource-group <rg-name> \\\n  --template-file <bicep-file> \\\n  --validation-level ProviderNoRbac\n```\n\nNote the fallback in the report—the user may lack full deployment permissions.\n\n### Step 4: Capture What-If Results\n\nParse the what-if output to categorize resource changes:\n\n| Change Type | Symbol | Meaning |\n|-------------|--------|---------|\n| Create | `+` | New resource will be created |\n| Delete | `-` | Resource will be deleted |\n| Modify | `~` | Resource properties will change |\n| NoChange | `=` | Resource unchanged |\n| Ignore | `*` | Resource not analyzed (limits reached) |\n| Deploy | `!` | Resource will be deployed (changes unknown) |\n\nFor modified resources, capture the specific property changes.\n\n### Step 5: Generate Report\n\nCreate a Markdown report file in the **project root** named:\n- `preflight-report.md`\n\nUse the template structure from [references/REPORT-TEMPLATE.md](references/REPORT-TEMPLATE.md).\n\n**Report sections:**\n1. **Summary** - Overall status, timestamp, files validated, target scope\n2. **Tools Executed** - Commands run, versions, validation levels used\n3. **Issues** - All errors and warnings with severity and remediation\n4. **What-If Results** - Resources to create/modify/delete/unchanged\n5. **Recommendations** - Actionable next steps\n\n## Required Information\n\nBefore running validation, gather:\n\n| Information | Required For | How to Obtain |\n|-------------|--------------|---------------|\n| Resource Group | `az deployment group` | Ask user or check existing `.azure/` config |\n| Subscription | All deployments | `az account show` or ask user |\n| Location | Sub/MG/Tenant scope | Ask user or use default from config |\n| Environment | azd projects | `azd env list` or ask user |\n\nIf required information is missing, prompt the user before proceeding.\n\n## Error Handling\n\nSee [references/ERROR-HANDLING.md](references/ERROR-HANDLING.md) for detailed error handling guidance.\n\n**Key principle:** Continue validation even when errors occur. Capture all issues in the final report.\n\n| Error Type | Action |\n|------------|--------|\n| Not logged in | Note in report, suggest `az login` or `azd auth login` |\n| Permission denied | Fall back to `ProviderNoRbac`, note in report |\n| Bicep syntax error | Include all errors, continue to other files |\n| Tool not installed | Note in report, skip that validation step |\n| Resource group not found | Note in report, suggest creating it |\n\n## Tool Requirements\n\nThis skill uses the following tools:\n\n- **Azure CLI** (`az`) - Version 2.76.0+ recommended for `--validation-level`\n- **Azure Developer CLI** (`azd`) - For projects with `azure.yaml`\n- **Bicep CLI** (`bicep`) - For syntax validation\n- **Azure MCP Tools** - For documentation lookups and best practices\n\nCheck tool availability before starting:\n```bash\naz --version\nazd version\nbicep --version\n```\n\n## Example Workflow\n\n1. User: \"Validate my Bicep deployment before I run it\"\n2. Agent detects `azure.yaml` → azd project\n3. Agent finds `infra/main.bicep` and `infra/main.bicepparam`\n4. Agent runs `bicep build infra/main.bicep --stdout`\n5. Agent runs `azd provision --preview`\n6. Agent generates `preflight-report.md` in project root\n7. Agent summarizes findings to user\n\n## Reference Documentation\n\n- [Validation Commands Reference](references/VALIDATION-COMMANDS.md)\n- [Report Template](references/REPORT-TEMPLATE.md)\n- [Error Handling Guide](references/ERROR-HANDLING.md)","tags":["azure","deployment","preflight","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/azure-deployment-preflight","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T17:40:17.594Z","embedding":null,"createdAt":"2026-04-18T20:25:32.958Z","updatedAt":"2026-04-22T17:40:17.594Z","lastSeenAt":"2026-04-22T17:40:17.594Z","tsv":"'1':98,111,274,569,807 '2':135,202,578,817 '2.76.0':764 '3':172,249,259,587,823 '4':485,597,829 '5':546,605,836 '6':842 '7':849 'account':638 'action':607,699 'agent':818,824,830,837,843,850 'analyz':527 'appropri':265 'ask':627,641,646,660 'attempt':214 'auth':711 'auto':174 'auto-detect':173 'avail':795 'awesom':4 'az':24,69,132,327,334,341,348,366,385,403,424,455,624,637,707,762,799 'azd':29,64,66,114,126,146,276,281,289,302,654,656,710,773,801,821,839 'azur':1,9,22,26,40,250,632,760,770,784 'azure.yaml':118,278,310,777,820 'back':716 'base':267 'bash':217,288,301,360,454,798 'best':791 'bicep':16,45,137,141,180,188,204,207,218,235,308,317,722,778,780,803,811,832 'bicepparam':187 'build':219,231,833 'captur':90,223,486,540,690 'categor':498 'category-awesome-copilot' 'chang':50,500,501,520,535,544 'check':107,112,148,210,630,793 'choos':263 'cli':23,28,133,208,236,761,772,779 'command':71,324,581,858 'common':166,365 'config':633,652 'continu':79,246,684,728 'copilot':5 'creat':505,510,549,750 'create/modify/delete/unchanged':604 'declar':321 'default':326,650 'delet':511,515 'deni':714 'deploy':2,10,17,37,52,61,70,104,169,215,287,313,328,335,342,349,367,386,404,425,456,482,530,534,625,636,812 'detail':678 'detect':99,175,271,819 'determin':102,311 'develop':27,771 'directori':150,200 'document':788,856 'env':657 'environ':294,299,305,653 'error':225,449,590,672,679,688,697,724,727,864 'even':84,686 'exampl':805 'execut':19,580 'exist':279,300,631 'fail':89,446 'fall':715 'fallback':439,473 'file':46,138,142,159,177,181,186,318,377,394,416,433,466,553,574,731 'final':95,695 'find':139,825,852 'first':151,359 'follow':74,758 'found':124,130,745 'full':481 'gather':615 'generat':547,844 'github':8 'group':329,362,368,374,401,412,457,463,623,626,743 'guid':866 'guidanc':681 'handl':673,680,865 'id':413 'ignor':524 'includ':725 'indic':110 'inform':611,616,664 'infra':149,168 'infra/main.bicep':826,834 'infra/main.bicepparam':828 'infrastructur':38 'instal':239,734 'issu':92,242,588,692 'json':192,197 'key':682 'lack':480 'level':358,381,398,420,437,444,469,585,769 'limit':528 'line/column':227 'list':658 'locat':136,167,391,409,430,643 'log':701 'login':708,712 'look':116,182 'lookup':789 'make':54 'manag':400,411 'management-group-id':410 'managementgroup':340 'markdown':551 'match':184 'may':479 'mcp':785 'mean':504 'messag':230 'mg':343,405 'miss':666 'modifi':516,538 'multipl':298 'name':558 'new':506 'next':82,608 'nochang':521 'note':240,471,703,719,735,746 'number':228 'obtain':621 'occur':689 'order':78 'output':496 'overal':571 'paramet':176,185,189,193,196,378,395,417,434 'parameters.json':191,194 'pars':491 'permiss':57,448,483,713 'practic':792 'prefer':190 'preflight':3,11,261 'preflight-report.md':559,845 'prepar':42 'preview':48,283,291,304,841 'previous':87 'principl':683 'proceed':671 'process':73 'project':100,109,115,121,147,153,170,269,277,556,655,775,822,847 'prompt':667 'properti':518,543 'provid':356,382,399,421,438,445 'providernorbac':453,470,718 'provis':67,282,290,303,840 'rbac':450 'reach':529 'recommend':606,765 'refer':855,859 'references/error-handling.md':675,676,867 'references/report-template.md':565,566,863 'references/validation-commands.md':860 'remedi':596 'report':96,245,476,548,552,567,696,705,721,737,748,861 'requir':610,617,663,753 'resourc':361,373,462,499,507,512,517,522,525,531,539,602,622,742 'resource-group':372,461 'resourcegroup':325 'result':490,601 'retri':451 'review':44 'root':122,154,171,557,848 'run':63,206,260,354,582,613,815,831,838 'scope':314,323,363,384,402,423,577,645 'search':165 'section':568 'see':674 'sever':594 'show':639 'skill':6,14,35,755 'skip':738 'source-github' 'specif':542 'specifi':160,296 'standalon':156,307 'start':797 'status':233,572 'stdout':220,835 'step':76,83,88,97,201,248,258,273,484,545,609,741 'strategi':440 'structur':563 'sub':336,387 'sub/mg/tenant':644 'subscript':333,383,634 'success/failure':232 'suffici':59 'suggest':706,749 'summar':851 'summari':570 'support':20 'symbol':503 'syntax':205,212,224,253,723,782 'target':322,576 'targetscop':320 'templat':211,376,393,415,432,465,562,862 'template-fil':375,392,414,431,464 'tenant':347,350,422,426 'timestamp':573 'tool':579,732,752,759,786,794 'type':101,270,502,698 'unchang':523 'unknown':536 'use':33,125,131,157,280,560,586,649,756 'user':163,478,628,642,647,661,669,808,854 'valid':12,15,72,144,203,216,252,262,266,285,357,380,397,419,436,443,468,575,584,614,685,740,768,783,809,857 'validation-level':379,396,418,435,442,467,767 'verifi':56 'version':583,763,800,802,804 'warn':229,592 'what-if':255,330,337,344,351,369,388,406,427,458,487,493,598 'workflow':30,105,127,134,806","prices":[{"id":"ed112d91-7a2d-4eca-8cb1-2464674cf40b","listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:32.958Z"}],"sources":[{"listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","source":"github","sourceId":"github/awesome-copilot/azure-deployment-preflight","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/azure-deployment-preflight","isPrimary":false,"firstSeenAt":"2026-04-18T21:48:23.396Z","lastSeenAt":"2026-04-22T12:52:06.462Z"},{"listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","source":"skills_sh","sourceId":"github/awesome-copilot/azure-deployment-preflight","sourceUrl":"https://skills.sh/github/awesome-copilot/azure-deployment-preflight","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:32.958Z","lastSeenAt":"2026-04-22T17:40:17.594Z"}],"details":{"listingId":"cda4244f-75f0-4727-acf9-ce3750e185cc","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"azure-deployment-preflight","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/azure-deployment-preflight"},"updatedAt":"2026-04-22T17:40:17.594Z"}}