Bicep Deploy Recipe
Deploy to Azure using Bicep templates directly.
Prerequisites
azCLI installed with Bicep extension.azure/deployment-plan.mdexists with statusValidated- Bicep templates exist in
infra/ - Subscription and location confirmed → See Pre-Deploy Checklist
Workflow
| Step | Task | Command |
|---|---|---|
| 1 | Pre-deploy checklist | Confirm subscription/location with user |
| 2 | Build (optional) | az bicep build --file main.bicep |
| 3 | Deploy | az deployment sub create |
| 4 | Verify | az resource list |
| 5 | Report | Present deployed endpoint URLs to the user — see Verification |
Deployment Commands
Subscription-Level Deployment
az deployment sub create \
--location eastus2 \
--template-file ./infra/main.bicep \
--parameters ./infra/main.parameters.jsonResource Group Deployment
az deployment group create \
--resource-group rg-myapp-dev \
--template-file ./infra/main.bicep \
--parameters ./infra/main.parameters.jsonWith Inline Parameters
az deployment sub create \
--location eastus2 \
--template-file ./infra/main.bicep \
--parameters environmentName=dev location=eastus2What-If (Preview Changes)
az deployment sub what-if \
--location eastus2 \
--template-file ./infra/main.bicep \
--parameters environmentName=devGet Deployment Outputs
az deployment sub show \
--name main \
--query properties.outputsReferences
MCP Tools
| Tool | Purpose |
|---|---|
mcp_bicep_get_bicep_best_practices | Best practices |
mcp_bicep_get_az_resource_type_schema | Resource schemas |
mcp_bicep_list_avm_metadata | Azure Verified Modules |
AVM Verification Before Deploy
Before running deployment commands, verify generated templates followed AVM-first module selection:
- AVM Bicep Pattern Modules (prefer AVM+AZD patterns)
- AVM Bicep Resource Modules
- AVM Bicep Utility Modules
If no AVM+AZD pattern module is available, fallback must remain within AVM modules (resource -> utility).
Cleanup (DESTRUCTIVE)
az group delete --name <rg-name> --yes⚠️ Permanently deletes ALL resources in the group.