Azure Enterprise Infra Planner
Architect and provision enterprise Azure infrastructure from workload descriptions, targeting cloud architects and platform engineers. This runbook guides the agent through planning networking (VNets, subnets, firewalls, private endpoints, VPN gateways)…
9 steps · start to finish.
- 1Step 1
Environment Setup
▶Verify all required tools and credentials are present before proceeding.
echo "=== ENVIRONMENT SETUP ===" # Verify Azure CLI command -v az >/dev/null || { echo "ERROR: Azure CLI not installed"; exit 1; } az account show >/dev/null 2>&1 || { echo "ERROR: Not logged in to Azure. Run: az login"; exit 1; } # Verify IaC tooling IaC_FORMAT="${IaC_FORMAT:-bicep}" if [ "$IaC_FORMAT" = "bicep" ]; then az bicep version >/dev/null 2>&1 || az bicep install elif [ "$IaC_FORMAT" = "terraform" ]; then command -v terraform >/dev/null || { echo "ERROR: Terraform not installed"; exit 1; } fi # Create output directories mkdir -p /app/results/iac echo "Results directory: /app/results" echo "IaC format: $IaC_FORMAT" # Display current subscription az account show --query "{name:name, id:id, tenantId:tenantId}" -o table echo "Setup complete." - 2Step 2
Phase 1 — Research with WAF Tools
▶Use MCP tools to gather best practices and WAF guidance for all services mentioned in the user's workload description. Do not proceed until all MCP tool calls complete.
- 3Step 3
Phase 2 — Refine and Lookup Resources
▶Based on WAF research, identify the complete list of Azure resources required. Present the resource list to the user for approval before proceeding.
- 4Step 4
Phase 3 — Infrastructure Plan Generation
▶Generate the infrastructure plan JSON and write it to disk.
- 5Step 5
Phase 4 — Verification
▶Run all checks against the generated plan. All checks must pass before proceeding to IaC generation.
- 6Step 6
Phase 5 — Infrastructure-as-Code Generation
▶Only proceed when meta.status == "approved". Generate Bicep or Terraform files.
- 7Step 7
Phase 6 — Deployment (Requires User Confirmation)
▶STOP: Deployment is destructive and irreversible. Do not proceed without explicit user confirmation.
- 8Step 8
Iterate on Errors (max 3 rounds)
▶If any phase (IaC validation, deployment, or verification) returns errors:
- 9Step 9
Write Summary and Validation Report
▶import json, pathlib from datetime import datetime, timezone