Generated banner for Azure Validate
Generated logo for Azure Validate

Azure Validate

MicrosoftOfficialCreated by Microsoft

  • Skill
  • Workflow
  • Cloud and DevOps
  • MIT
  • Low risk
  • Has scripts

From the author

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.
— the description by Microsoft

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/azure-validate/download
  2. Unzip 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.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

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 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.

Files

references/recipes/azd/scripts/set-aspire-aca-env.sh

#!/usr/bin/env bash
# Set the Container Apps environment variables that Aspire "limited mode" leaves unpopulated.
#
# When Aspire runs in "limited mode", `azd provision` creates the Azure resources
# (Container Registry, Managed Identity, Container Apps Environment) but does NOT populate the
# env vars that `azd deploy` needs to reference them. This script fills that gap.
#
# Run it AFTER `azd provision` but BEFORE `azd deploy`.
#
# USAGE:
#   ./set-aspire-aca-env.sh [-e <azd-env-name>]
#
#   -e, --environment   Optional azd environment name (forwarded to `azd env` calls).
#                       Defaults to the current/default azd environment.
#
# The script only sets a variable if it is currently missing, and prints what it did so the
# result can be understood without re-inspecting `azd env get-values`:
#   AZURE_CONTAINER_REGISTRY_ENDPOINT              <- az acr list ... [0].loginServer
#   AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID   <- az identity list ... [0].id
#   MANAGED_IDENTITY_CLIENT_ID                     <- az identity list ... [0].clientId

set -e

AZD_ENV_NAME=""
while [ $# -gt 0 ]; do
  case "$1" in
    -e|--environment)
      AZD_ENV_NAME="$2"
      shift 2
      ;;
    *)
      echo "ERROR: Unknown argument: $1" >&2
      echo "USAGE: ./set-aspire-aca-env.sh [-e <azd-env-name>]" >&2
      exit 1
      ;;
  esac
done

# Build the shared `-e <name>` argument list for azd calls (empty when no env name given).
AZD_ENV_ARGS=""
if [ -n "$AZD_ENV_NAME" ]; then
  AZD_ENV_ARGS="-e $AZD_ENV_NAME"
fi

# Capture azd environment values via command substitution so `set -e` aborts if the
# `azd env get-values` call itself fails (rather than silently continuing with no values).
AZD_VALUES=$(azd env get-values $AZD_ENV_ARGS)

# get_env_value <KEY> — print the (unquoted) value of KEY from AZD_VALUES, empty if absent.
# Uses only POSIX-friendly tools so it works on the widely-available Bash 3.2 (e.g. macOS).
get_env_value() {
  printf '%s\n' "$AZD_VALUES" \
    | grep "^$1=" \
    | head -n 1 \
    | sed -e "s/^$1=//" -e 's/^"\(.*\)"$/\1/' -e "s/^'\(.*\)'$/\1/"
}

RG_NAME=$(get_env_value AZURE_RESOURCE_GROUP)
if [ -z "$RG_NAME" ]; then
  echo "ERROR: AZURE_RESOURCE_GROUP is not set in the azd environment." >&2
  echo "Run 'azd provision' before this script so the resource group is available." >&2
  exit 1
fi

# set_if_missing <ENV_VAR_NAME> <description> <resolver command...>
# The resolver command is passed as arguments and run via "$@" — no eval.
set_if_missing() {
  var_name="$1"
  description="$2"
  shift 2

  existing=$(get_env_value "$var_name")
  if [ -n "$existing" ]; then
    echo "$var_name: already present ($existing)"
    return 0
  fi

  value=$("$@")
  if [ -z "$value" ]; then
    echo "ERROR: Could not resolve $var_name ($description) in resource group '$RG_NAME'." >&2
    echo "Confirm 'azd provision' completed and the resource exists." >&2
    exit 1
  fi

  azd env set $AZD_ENV_ARGS "$var_name" "$value"
  echo "$var_name: set to $value"
}

echo "Resource group: $RG_NAME"

set_if_missing \
  "AZURE_CONTAINER_REGISTRY_ENDPOINT" \
  "container registry login server" \
  az acr list --resource-group "$RG_NAME" --query "[0].loginServer" -o tsv

set_if_missing \
  "AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID" \
  "managed identity resource id" \
  az identity list --resource-group "$RG_NAME" --query "[0].id" -o tsv

set_if_missing \
  "MANAGED_IDENTITY_CLIENT_ID" \
  "managed identity client id" \
  az identity list --resource-group "$RG_NAME" --query "[0].clientId" -o tsv

echo "Aspire Container Apps environment variables are ready for 'azd 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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-validate.zip