← All runbooks
microsoft / azure-enterprise-infra-planner

Azure Enterprise Infra Planner

Architect and provision enterprise A

agent claude-codemodel claude-sonnet-4-6snapshot python312-uveval programmatic9 stepsv1.0.0

Deploy Azure Enterprise Infra Planner to your jetty.io

One-click installs this runbook into a collection on your Jetty account. You can run it from the Spot dashboard, schedule it, or pipe inputs in via the API.

The shape of the run

9 steps · start to finish.

  1. 1
    Step 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."
    

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

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

  4. 4
    Step 4

    Phase 3 — Infrastructure Plan Generation

    Generate the infrastructure plan JSON and write it to disk.

  5. 5
    Step 5

    Phase 4 — Verification

    Run all checks against the generated plan. All checks must pass before proceeding to IaC generation.

  6. 6
    Step 6

    Phase 5 — Infrastructure-as-Code Generation

    Only proceed when `meta.status == "approved"`. Generate Bicep or Terraform files.

  7. 7
    Step 7

    Phase 6 — Deployment (Requires User Confirmation)

    **STOP:** Deployment is destructive and irreversible. Do not proceed without explicit user confirmation.

  8. 8
    Step 8

    Iterate on Errors (max 3 rounds)

    If any phase (IaC validation, deployment, or verification) returns errors:

  9. 9
    Step 9

    Write Summary and Validation Report

    import json, pathlib from datetime import datetime, timezone