Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Execute Azure deployments using azd, Terraform, or Bicep with built-in error recovery.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/recipes/bicep/README.md
1# Bicep Deploy Recipe23Deploy to Azure using Bicep templates directly.45## Prerequisites67- `az` CLI installed with Bicep extension8- `.azure/deployment-plan.md` exists with status `Validated`9- Bicep templates exist in `infra/`10- **Subscription and location confirmed** → See [Pre-Deploy Checklist](../../pre-deploy-checklist.md)1112## Workflow1314| Step | Task | Command |15|------|------|---------|16| 1 | **[Pre-deploy checklist](../../pre-deploy-checklist.md)** | Confirm subscription/location with user |17| 2 | Build (optional) | `az bicep build --file main.bicep` |18| 3 | Deploy | `az deployment sub create` |19| 4 | Verify | `az resource list` |20| 5 | **Report** | Present deployed endpoint URLs to the user — see [Verification](verify.md) |2122## Deployment Commands2324### Subscription-Level Deployment2526```bash27az deployment sub create \28--location eastus2 \29--template-file ./infra/main.bicep \30--parameters ./infra/main.parameters.json31```3233### Resource Group Deployment3435```bash36az deployment group create \37--resource-group rg-myapp-dev \38--template-file ./infra/main.bicep \39--parameters ./infra/main.parameters.json40```4142### With Inline Parameters4344```bash45az deployment sub create \46--location eastus2 \47--template-file ./infra/main.bicep \48--parameters environmentName=dev location=eastus249```5051### What-If (Preview Changes)5253```bash54az deployment sub what-if \55--location eastus2 \56--template-file ./infra/main.bicep \57--parameters environmentName=dev58```5960## Get Deployment Outputs6162```bash63az deployment sub show \64--name main \65--query properties.outputs66```6768## References6970- [Verification steps](./verify.md)71- [Error handling](./errors.md)7273## MCP Tools7475| Tool | Purpose |76|------|---------|77| `mcp_bicep_get_bicep_best_practices` | Best practices |78| `mcp_bicep_get_az_resource_type_schema` | Resource schemas |79| `mcp_bicep_list_avm_metadata` | Azure Verified Modules |8081## AVM Verification Before Deploy8283Before running deployment commands, verify generated templates followed AVM-first module selection:84851. AVM Bicep Pattern Modules (prefer AVM+AZD patterns)862. AVM Bicep Resource Modules873. AVM Bicep Utility Modules8889If no AVM+AZD pattern module is available, fallback must remain within AVM modules (resource -> utility).9091## Cleanup (DESTRUCTIVE)9293```bash94az group delete --name <rg-name> --yes95```9697⚠️ Permanently deletes ALL resources in the group.98