azure-bicep-deploy
v2.1.0Deploy and validate Azure Bicep files and ARM templates. Use for: (1) Deploying Bicep (.bicep) or ARM (JSON) templates to Azure, (2) Validating Bicep/ARM templates for syntax errors, (3) Creating Azure resources via Bicep, (4) Managing multi-environment deployments (dev/staging/prod) via parameters....
Installation
Azure Bicep Deploy
Prerequisites (Required)
Before using this skill, ensure:
-
Azure CLI installed
bash az --versionInstall from: https://docs.microsoft.com/cli/azure/install-azure-cli -
Azure CLI authenticated
bash az login # Interactive login az login --tenant <tenant-id> # For specific tenant az account show # Verify logged in -
Correct subscription selected (if multiple)
bash az account list # List subscriptions az account set --subscription <sub-id> # Switch subscription -
Bicep CLI installed
bash az bicep install # Install Bicep az bicep version # Verify installationOr use built-in:az deployment group createauto-compiles Bicep
Deploy a Bicep File
az deployment group create
--resource-group <rg-name>
--template-file <path-to-bicep>
--parameters <params-file>.json
Deploy an ARM Template
az deployment group create
--resource-group <rg-name>
--template-file <path-to-arm.json>
--parameters <params-file>.json
Validate a Template (What-If)
az deployment group what-if
--resource-group <rg-name>
--template-file <path-to-bicep>
Validate Syntax Only (Bicep)
az bicep build --file <bicep-file>
Multi-Environment Deployments
Use parameter files for each environment:
params/
├── dev.bicepparam # or dev.json
├── staging.bicepparam # or staging.json
└── prod.bicepparam # or prod.json
Deploy with environment:
az deployment group create
--resource-group <rg>-dev
--template-file main.bicep
--parameters @params/dev.json
Azure Container Apps
See references/container-apps.md for detailed Container App patterns including: - Basic container deployment - Ingress configuration - Scaling rules - revisions/versions
Create New Resources
When asked to create Azure resources via Bicep:
- Check if existing templates in
references/match your need - For Container Apps: use the sample in
assets/container-app/ - For other resources: generate using
az bicep build-params --fileor reference Azure QuickStart Templates
Scripts
Copy scripts from references or use directly:
- references/deploy.md — Deployment script with environment selection
- references/validate.md — Validate and what-if
- references/bicep-build.md — Build Bicep to ARM
Quick deploy (copy-paste one-liner):
az deployment group create --resource-group <rg> --template-file main.bicep --parameters @params/dev.json