Bicep Validation
Validation steps for standalone Bicep deployments.
Prerequisites
./infra/main.bicepexists./infra/main.parameters.jsonexists- Azure CLI authenticated
Validation Steps
- [ ] 1. Core Validation (CLI, auth, build, validate, what-if) — run
validate-deploymentscript - [ ] 2. Linting (optional)
- [ ] 3. Azure Policy Validation
Validation Details
1. Core Validation Script
The core validation checks are a fixed, deterministic sequence — identical to the AZCLI recipe. Run the shared validate-deployment helper instead of executing and parsing each command by hand. It confirms the Azure CLI is installed and authenticated, compiles the Bicep template (az bicep build), validates it against the target scope (az deployment ... validate), and runs a what-if preview — printing a compact PASS/FAIL summary plus a what-if change count (Create/Modify/Delete).
- Bash:
../scripts/validate-deployment.sh - PowerShell:
../scripts/validate-deployment.ps1
Subscription scope:
bash
../scripts/validate-deployment.sh --scope sub --location <location>powershell
../scripts/validate-deployment.ps1 -Scope sub -Location <location>Resource group scope:
bash