Azure Validate
MicrosoftOfficialCreated by Microsoft
- Skill
- Workflow
- Cloud and DevOps
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The azure-validate skill provides a structured, step-by-step workflow to ensure Azure readiness before deployment. It performs deep checks on infrastructure definitions (Bicep or Terraform), RBAC role assignments, managed identity permissions, and other prerequisites. This skill is designed to be used as the second step in a three-part deployment process: azure-prepare, azure-validate, and azure-deploy. It uses a script-based approach to guide the user through validation steps, tracking progress in a local JSON file to ensure all requirements are met before allowing a deployment to proceed.
What it does
- Validates infrastructure configurations including Bicep and Terraform files.
- Verifies RBAC role assignments and managed identity permissions.
- Runs preflight checks to ensure environment readiness.
- Tracks validation progress through a structured, multi-step script.
- Ensures all prerequisites are met before deployment can occur.
- Provides a mechanism to troubleshoot common deployment errors.
When to use it
- Before executing an Azure deployment to ensure all configurations are correct.
- When troubleshooting deployment errors to identify configuration or permission issues.
- After completing the azure-prepare step to verify the deployment plan.
- When you need to confirm that RBAC and managed identity settings are correctly configured.
Advantages
- Prevents deployment failures by catching configuration issues early.
- Ensures consistent and repeatable validation processes.
- Integrates seamlessly into a standard deployment workflow.
- Provides clear, actionable feedback on validation status.
Usage examples
- “Validate my Azure deployment readiness.”
- The agent initiates the azure-validate workflow script, guiding you through the necessary checks for your infrastructure and permissions.
- “Check if my Bicep files are ready for deployment.”
- The agent runs the validation script against your Bicep files and reports any configuration errors or missing prerequisites.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/microsoft/azure-validate/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip azure-validate.zip -d .agents/skills
Documentation by Microsoft
Azure Validate
AUTHORITATIVE GUIDANCE — Follow these instructions exactly unless they contradict security policies given to you.
⛔ STOP — PREREQUISITE CHECK REQUIRED
Before proceeding, verify this prerequisite is met:
azure-prepare was invoked and completed →
.azure/deployment-plan.mdexists with statusApprovedor laterIf the plan is missing, STOP IMMEDIATELY and invoke azure-prepare first.
The complete workflow ensures success:
azure-prepare→azure-validate→azure-deploy
Triggers
Check if app is ready to deploy
Validate azure.yaml or Bicep
Run preflight checks
Troubleshoot deployment errors
Rules
Run after azure-prepare, before azure-deploy
All checks must pass—do not deploy with failures
⛔ Destructive actions require
ask_user— global-rules
Steps
Run the workflow script and follow its instructions. It walks you through each validation step one at a time, recording progress in .azure/validate-status.json. Use references/scripts/workflow.ps1 on Windows or references/scripts/workflow.sh on macOS/Linux.
Start by calling the script without the completed-step argument:
pwsh references/scripts/workflow.ps1 -WorkspacePath <workspace-path>
# macOS/Linux: bash references/scripts/workflow.sh --workspace-path <workspace-path>Each run prints the next action and the value to pass next. Perform the action, then re-run with that value (-CompletedStep <value> for pwsh, --completed-step <value> for bash). Repeat until it reports the azure-validate workflow is complete.
The steps reference recipe details in references/recipes/README.md and role checks in references/role-verification.md.
⛔ VALIDATION AUTHORITY
This skill is the officially verified way to set plan status to
Validated. You MUST follow the script's instructions to completion before setting status toValidated. Do NOT set status toValidatedwithout doing so.
⚠️ NEXT STEP — DEPENDS ON USER INTENT
After ALL validations pass, check whether the user asked to deploy:
If the user explicitly requested deployment, you MUST invoke azure-deploy to execute it. Do NOT run
azd up,azd deploy, or any deployment commands directly — let azure-deploy handle execution.If the user only asked to validate or prepare (not deploy), STOP after recording proof and setting status to
Validated. Report the validation results and do NOT invoke azure-deploy.If any validation failed, fix the issues and re-run azure-validate before proceeding.
Files
- ATTRIBUTION.mdAdded by AutoGineer974 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md3.5 KiB
- references/aspire-functions-secrets.md3.7 KiB
- references/global-rules.md1.2 KiB
- references/policy-validation.md1.5 KiB
- references/recipes/README.md374 B
- references/recipes/azcli/README.md2.7 KiB
- references/recipes/azcli/errors.md505 B
- references/recipes/azd/README.md5.3 KiB
- references/recipes/azd/aspire.md1.7 KiB
- references/recipes/azd/environment.md1.9 KiB
- references/recipes/azd/errors.md2.6 KiB
- references/recipes/azd/scripts/set-aspire-aca-env.ps1Script3.5 KiB
- references/recipes/azd/scripts/set-aspire-aca-env.shScript3.6 KiB
- references/recipes/bicep/README.md2.5 KiB
- references/recipes/bicep/errors.md374 B
- references/recipes/scripts/validate-deployment.ps1Script5.2 KiB
- references/recipes/scripts/validate-deployment.shScript6.1 KiB
- references/recipes/terraform/README.md3.9 KiB
- references/recipes/terraform/errors.md2.8 KiB
- references/recipes/terraform/scripts/validate-terraform.ps1Script6.8 KiB
- references/recipes/terraform/scripts/validate-terraform.shScript6.6 KiB
- references/region-availability.md3.0 KiB
- references/role-verification.md3.9 KiB
- references/scripts/scan-aspire-functions-secrets.ps1Script3.0 KiB
- references/scripts/scan-aspire-functions-secrets.shScript3.3 KiB
- references/scripts/workflow.ps1Script5.2 KiB
- references/scripts/workflow.shScript5.7 KiB
references/recipes/azd/README.md
AZD Validation
Validation steps for Azure Developer CLI projects.
Prerequisites
azure.yamlexists in project rootInfrastructure files exist:
For Bicep:
./infra/contains Bicep filesFor Terraform:
./infra/contains.tffiles andazure.yamlhasinfra.provider: terraform
Validation Steps
[ ] 1. AZD Installation
[ ] 2. Schema Validation
[ ] 3. Environment Setup
[ ] 4. Authentication Check
[ ] 5. Subscription/Location Check
[ ] 6. Aspire Pre-Provisioning Checks
[ ] 7. Provision Preview
[ ] 8. Build Verification
[ ] 9. Docker Build Context Validation
[ ] 10. Package Validation
[ ] 11. Azure Policy Validation
[ ] 12. Aspire Post-Provisioning Checks
Validation Details
1. AZD Installation
Verify AZD is installed:
azd versionIf not installed:
mcp_azure_mcp_extension_cli_install(cli-type: "azd")2. Schema Validation
Validate azure.yaml against official schema:
mcp_azure_mcp_azd(command: "validate_azure_yaml", parameters: { path: "./azure.yaml" })3. Environment Setup
Verify AZD environment exists and is configured. See Environment Setup for detailed steps.
4. Authentication Check
azd auth login --check-statusIf not logged in:
azd auth login5. Subscription/Location Check
Check environment values:
azd env get-valuesIf AZURE_SUBSCRIPTION_ID or AZURE_LOCATION not set:
Use Azure MCP tools to list subscriptions:
mcp_azure_mcp_subscription_listUse Azure MCP tools to list resource groups (check for conflicts):
mcp_azure_mcp_group_list
subscription: <subscription-id>Prompt user to confirm subscription and location before continuing.
Refer to the region availability reference to select a region supported by all services in this template:
azd env set AZURE_SUBSCRIPTION_ID <subscription-id>
azd env set AZURE_LOCATION <location>6. Aspire Pre-Provisioning Checks
If this is a .NET Aspire project (detected by *.AppHost.csproj or Aspire.Hosting package reference), run the Pre-Provisioning checks in Aspire Validation before continuing. If not Aspire, skip this step.
7. Provision Preview
Validate IaC is ready (must complete without error):
azd provision --preview --no-prompt💡 Note: This works for both Bicep and Terraform. azd will automatically detect the provider from
azure.yamland run the appropriate validation (bicep buildorterraform plan).
If azd provision --preview fails with unsupported resource type:
⛔ Stop deployment immediately. Do NOT attempt to fix or work around the error.
This error means the Aspire AppHost contains custom resource types that have no Azure deployment target (e.g., HealthChecksUI, custom child resources, or local-only integrations). These resources are intentionally designed for local development tooling and cannot be meaningfully deployed to Azure.
Required actions:
⛔ Do NOT modify source code to suppress the error (e.g., do not add
.ExcludeFromManifest()).⛔ Do NOT proceed with
azd provisionorazd deploy.✅ Inform the user: "This application contains custom Aspire resource types (
unsupported resource type: <type-name>) that cannot be deployed to Azure. The application is designed for local development only."✅ Record a blocker: "Deployment blocked — AppHost contains unsupported resource types with no Azure deployment target."
⚠️ Adding
.ExcludeFromManifest()to suppress the error may allow provisioning to proceed, but the resulting deployment will not represent the application's actual functionality and is not a valid deployment.
8. Build Verification
Build the project and verify there are no errors. If the build fails, fix the issues and re-build until it succeeds. Do NOT proceed to packaging or deployment with build errors.
9. Docker Build Context Validation
If any service in azure.yaml uses a Dockerfile (check the service's project path from azure.yaml for a Dockerfile), validate the build context before packaging:
Read each service's
DockerfileIf the Dockerfile contains
npm ci, verifypackage-lock.jsonexists in the same directoryIf
package-lock.jsonis missing, generate it in the service'sprojectpath directory before proceeding:
cd <service-project-path>
npm install --package-lock-only⚠️ Warning:
npm ciwill fail during Docker build ifpackage-lock.jsonis missing. This check prevents Docker build failures duringazd packageandazd up.
10. Package Validation
Confirm all services package successfully:
azd package --no-prompt11. Azure Policy Validation
See Policy Validation Guide for instructions on retrieving and validating Azure policies for your subscription.
12. Aspire Post-Provisioning Checks
If this is a .NET Aspire project, run the Post-Provisioning checks in Aspire Validation before proceeding to deployment. If not Aspire, skip this step.
References
Next
All checks pass → azure-deploy
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-skills/skills/azure-validate · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- microsoft/azure-skills
AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-validate.zip