#!/usr/bin/env bash
# Analyze all quotas and find optimal VM sizes

LOCATION="westeurope"

echo "==================================================================="
echo "  QUOTA ANALYSIS FOR WEST EUROPE"
echo "==================================================================="
echo ""

echo "📊 Current Quota Usage:"
az vm list-usage --location "$LOCATION" --query "[].{Name:name.value, Current:currentValue, Limit:limit, Available:limit - currentValue}" -o table

echo ""
echo "🔍 Available VM Sizes (1-2 vCPUs):"
az vm list-sizes --location "$LOCATION" --query "[?numberOfCores <= 2 && numberOfCores >= 1].{Name:name, vCPUs:numberOfCores, MemoryGB:memoryInMb/1024, Cost:name}" -o table | head -20

echo ""
echo "💰 Recommended VM Sizes for Quota Constraints:"
echo ""
echo "Option 1: Standard_B1s (1 vCPU, 1GB RAM) - Burstable"
echo "  • Cost: Low"
echo "  • Best for: Development, testing"
echo ""
echo "Option 2: Standard_B1ms (1 vCPU, 2GB RAM) - Burstable"
echo "  • Cost: Low"
echo "  • Best for: Light workloads"
echo ""
echo "Option 3: Standard_B2s (2 vCPUs, 4GB RAM) - Burstable"
echo "  • Cost: Low-Medium"
echo "  • Best for: Small production workloads"
echo ""
echo "Option 4: Standard_D2s_v3 (2 vCPUs, 8GB RAM) - General Purpose"
echo "  • Cost: Medium"
echo "  • Best for: Production workloads"
echo "  • Currently in use"
