azure-deployment-preflight

Validates Bicep deployments to Azure using syntax checks, what-if analysis, and permission verification.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/lettucebo/Skills --skill azure-deployment-preflight-lettucebo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: azure-deployment-preflight
Source: https://github.com/lettucebo/Skills/tree/main/skills/azure/azure-deployment-preflight
Command: npx skills add https://github.com/lettucebo/Skills --skill azure-deployment-preflight-lettucebo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deploying Bicep templates to Azure without validation can cause failed deployments, unexpected resource changes, or permission errors discovered only mid-deployment. This Skill runs a complete preflight check so you can preview changes and catch issues before any resource is touched. ## Core Features & Use Cases - Bicep Syntax Validation: Runs bicep build to catch compilation errors with exact line and column numbers before deployment. - What-If Analysis: Executes az deployment what-if or azd provision --preview to preview resources that will be created, modified, or deleted across resource group, subscription, management group, and tenant scopes. - Permission & Fallback Handling: Detects RBAC permission failures and automatically falls back from Provider to ProviderNoRbac validation, documenting limitations in the report. - Structured Report Generation: Produces a preflight-report.md in the project root summarizing issues, change counts, and actionable recommendations. - Use Case: Before running azd up on a project with infra/main.bicep, activate this Skill to confirm the template compiles, preview the three new resources it will create, and verify your account has sufficient deployment permissions. ## Quick Start Validate my Bicep deployment and generate a preflight report 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 template and parameters to preview changes without deploying. This Skill automates that process, detecting your project type, running the correct what-if command for your deployment scope, and summarizing resources to create, modify, or delete.

How to validate Bicep file syntax before deployment?▼

Use bicep build <file> --stdout to compile the template and surface syntax errors with line and column numbers. The Skill runs this as its first validation step and captures all errors in the final preflight report.

Does this work with Azure Developer CLI azd projects?▼

Yes, the Skill detects azd projects by looking for azure.yaml in the project root. For azd projects it runs azd provision --preview instead of raw az deployment commands, and supports selecting a specific environment.

What happens if I lack deployment permissions for what-if validation?▼

The Skill first attempts validation with the Provider level, which requires full RBAC permissions. If that fails with an authorization error, it automatically retries with ProviderNoRbac and notes the permission limitation in the report.

Which deployment scopes does Bicep what-if support?▼

What-if supports resource group, subscription, management group, and tenant scopes. The Skill reads the targetScope declaration in your Bicep file and selects the matching command, such as az deployment sub what-if for subscription scope.

What tools are required to run Azure deployment preflight validation?▼

You need Azure CLI version 2.76.0 or later recommended, plus Bicep CLI for syntax validation. Azure Developer CLI is required only for projects containing an azure.yaml file, and missing tools are noted in the report rather than stopping validation.