> **azure-validate** — chapter 32 of 41 in [microsoft/azure-skills](https://skillsdocs.com/microsoft/azure-skills).
>
> Book (all chapters, one file): https://skillsdocs.com/microsoft/azure-skills.md
> Machine manifest: https://skillsdocs.com/microsoft/azure-skills/.well-known/agent-skills/index.json
> Install the book: `npx skills add microsoft/azure-skills`
> Upstream: https://github.com/microsoft/azure-skills/blob/main/skills/azure-validate/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/
> Licence: MIT — https://spdx.org/licenses/MIT.html
>
> Bundled files (26), referenced from this skill's directory:
>   - `references/aspire-functions-secrets.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/aspire-functions-secrets.md
>   - `references/global-rules.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/global-rules.md
>   - `references/policy-validation.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/policy-validation.md
>   - `references/recipes/azcli/errors.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azcli/errors.md
>   - `references/recipes/azcli/README.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azcli/README.md
>   - `references/recipes/azd/aspire.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azd/aspire.md
>   - `references/recipes/azd/environment.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azd/environment.md
>   - `references/recipes/azd/errors.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azd/errors.md
>   - `references/recipes/azd/README.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azd/README.md
>   - `references/recipes/azd/scripts/set-aspire-aca-env.ps1` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azd/scripts/set-aspire-aca-env.ps1
>   - `references/recipes/azd/scripts/set-aspire-aca-env.sh` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/azd/scripts/set-aspire-aca-env.sh
>   - `references/recipes/bicep/errors.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/bicep/errors.md
>   - `references/recipes/bicep/README.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/bicep/README.md
>   - `references/recipes/README.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/README.md
>   - `references/recipes/scripts/validate-deployment.ps1` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/scripts/validate-deployment.ps1
>   - `references/recipes/scripts/validate-deployment.sh` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/scripts/validate-deployment.sh
>   - `references/recipes/terraform/errors.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/terraform/errors.md
>   - `references/recipes/terraform/README.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/terraform/README.md
>   - `references/recipes/terraform/scripts/validate-terraform.ps1` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/terraform/scripts/validate-terraform.ps1
>   - `references/recipes/terraform/scripts/validate-terraform.sh` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/recipes/terraform/scripts/validate-terraform.sh
>   - `references/region-availability.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/region-availability.md
>   - `references/role-verification.md` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/role-verification.md
>   - `references/scripts/scan-aspire-functions-secrets.ps1` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/scripts/scan-aspire-functions-secrets.ps1
>   - `references/scripts/scan-aspire-functions-secrets.sh` — https://raw.githubusercontent.com/microsoft/azure-skills/main/skills/azure-validate/references/scripts/scan-aspire-functions-secrets.sh
>   - …and 2 more, listed in https://skillsdocs.com/api/v1/books/microsoft/azure-skills/skills/azure-validate
>
> Content © its authors, served unmodified. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: azure-validate
description: "Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment."
license: MIT
metadata:
  author: Microsoft
  version: "1.2.2"
---

# 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.md` exists with status `Approved` or later
>
> If 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

1. Run after azure-prepare, before azure-deploy
2. All checks must pass—do not deploy with failures
3. ⛔ **Destructive actions require `ask_user`** — [global-rules](references/global-rules.md)

## 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](references/scripts/workflow.ps1) on Windows or [references/scripts/workflow.sh](references/scripts/workflow.sh) on macOS/Linux.

Start by calling the script **without** the completed-step argument:

```bash
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](references/recipes/README.md) and role checks in [references/role-verification.md](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 to `Validated`.
> Do NOT set status to `Validated` without 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.
