azure-deployment-preflight

Validates Bicep deployments with syntax checks, what-if analysis, and permission verification.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill azure-deployment-preflight-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-deployment-preflight
Source: https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula/tree/main/.github/skills/azure-deployment-preflight
Command: npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill azure-deployment-preflight-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deploying Bicep or ARM templates to Azure without validation can cause failed deployments, unexpected resource changes, or permission errors discovered too late. This Skill runs pre-deployment validation so you can preview infrastructure changes and catch issues before executing azd provision or az deployment. ## Core Features & Use Cases - Bicep Syntax Validation: Runs bicep build to catch syntax errors with exact line and column numbers before any Azure operation. - What-If Analysis: Executes az deployment what-if at the correct scope (resource group, subscription, management group, or tenant) or azd provision --preview for azd projects, categorizing resources to create, modify, or delete. - Permission and Error Handling: Detects RBAC permission gaps and falls back to ProviderNoRbac validation, continuing through all steps and aggregating every issue into a structured preflight-report.md. - Use Case: Before running azd up on a project with infra/main.bicep, ask the agent to validate the deployment; it detects the azd project, builds the Bicep file, previews changes, and writes a report listing three resources to create and one SKU modification to review. ## Quick Start Validate my Bicep deployment in the infra folder and show me a preview of the changes before I run azd provision.

Frequently Asked Questions about azure-deployment-preflight

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preview Azure Bicep deployment changes before deploying?

Run az deployment group what-if with your Bicep file and target resource group to preview changes without deploying. For azd projects with an azure.yaml file, use azd provision --preview instead. The output categorizes resources as create, modify, delete, or no change.

How to validate Bicep file syntax before deployment?

Run bicep build <file> --stdout to compile the template and surface syntax errors with exact line and column numbers, such as error BCP064. If the Bicep CLI is not installed, Azure validates syntax during the what-if operation.

What is the difference between azd provision --preview and az deployment what-if?

azd provision --preview is used for projects containing an azure.yaml file and previews the full azd environment. az deployment what-if is used for standalone Bicep files and requires specifying the deployment scope: group, sub, mg, or tenant.

Why does Azure what-if fail with AuthorizationFailed permission errors?

The default Provider validation level checks write permissions via RBAC, which fails without deployment rights. Retry with --validation-level ProviderNoRbac, which performs full validation using only read permissions, and request the Contributor role if needed.

Can I use this validation for Terraform deployments on Azure?

No, this validation only covers Bicep and ARM templates. For Terraform, use terraform validate and terraform plan instead, which provide equivalent syntax checking and change previews for Terraform configurations.