# Azure Region Setup - West Europe

## Overview

This deployment uses **West Europe** as the default region, excluding all US Commercial and Government regions.

## Commercial Regions Available

The following **43 commercial regions** (non-US, non-Government) are available:

### Europe
- **westeurope** (West Europe) - **Default**
- northeurope (North Europe)
- francecentral (France Central)
- francesouth (France South)
- germanywestcentral (Germany West Central)
- germanynorth (Germany North)
- italynorth (Italy North)
- belgiumcentral (Belgium Central)
- norwayeast (Norway East)
- norwaywest (Norway West)
- polandcentral (Poland Central)
- spaincentral (Spain Central)
- switzerlandnorth (Switzerland North)
- switzerlandwest (Switzerland West)
- swedencentral (Sweden Central)

### UK
- uksouth (UK South)
- ukwest (UK West)

### Middle East
- uaenorth (UAE North)
- uaecentral (UAE Central)
- israelcentral (Israel Central)
- qatarcentral (Qatar Central)

### Asia Pacific
- southeastasia (Southeast Asia)
- eastasia (East Asia)
- japaneast (Japan East)
- japanwest (Japan West)
- koreacentral (Korea Central)
- koreasouth (Korea South)
- centralindia (Central India)
- southindia (South India)
- westindia (West India)
- jioindiawest (Jio India West)
- jioindiacentral (Jio India Central)
- indonesiacentral (Indonesia Central)
- malaysiawest (Malaysia West)
- newzealandnorth (New Zealand North)

### Africa
- southafricanorth (South Africa North)
- southafricawest (South Africa West)

### Americas (Non-US)
- canadacentral (Canada Central)
- canadaeast (Canada East)
- mexicocentral (Mexico Central)
- brazilsouth (Brazil South)
- brazilsoutheast (Brazil Southeast)
- chilecentral (Chile Central)

## Required Resource Providers

All required resource providers are registered:

✅ **Microsoft.ContainerService** - AKS clusters
✅ **Microsoft.KeyVault** - Key Vault for secrets
✅ **Microsoft.Storage** - Storage accounts
✅ **Microsoft.Network** - VNet, Application Gateway, Load Balancer
✅ **Microsoft.Compute** - VMs, VM Scale Sets
✅ **Microsoft.Insights** - Azure Monitor
✅ **Microsoft.ManagedIdentity** - Managed Identities
✅ **Microsoft.Authorization** - RBAC
✅ **Microsoft.Resources** - Resource Groups

## Preview Features

No preview features are currently required.

## Quota Requirements

### VM Family Quotas (West Europe)

| VM Family | Required | Status |
|-----------|----------|--------|
| StandardD2sv3Family | 3 | ⚠️ May need quota increase |
| StandardD4sv3Family | 7 | ⚠️ May need quota increase |
| StandardD8sv3Family | 3 | ⚠️ May need quota increase |

### Network Quotas (West Europe)

| Resource | Required | Available | Status |
|----------|----------|-----------|--------|
| Public IPs | ~5 | 20 | ✅ Sufficient |
| Load Balancers | ~2 | 1000 | ✅ Sufficient |
| Network Interfaces | ~20 | 65536 | ✅ Sufficient |

### Service Quotas

| Service | Current | Limit | Status |
|---------|---------|-------|--------|
| AKS Clusters | 0 | 50 | ✅ Sufficient |
| Storage Accounts | 1 | 250 | ✅ Sufficient |

## Quota Increase Requests

If quotas are insufficient, request increases via:

1. **Azure Portal**: https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest
2. **Azure CLI**: 
   ```bash
   az vm list-usage --location westeurope
   ```

## Configuration Updates

### Default Region Changed

All default locations have been updated from `eastus` to `westeurope`:

- ✅ `terraform/variables.tf`
- ✅ `terraform/main.tf`
- ✅ `terraform/terraform.tfvars.example`
- ✅ `terraform/well-architected/variables.tf`
- ✅ `terraform/well-architected/main.tf`
- ✅ `terraform/well-architected/terraform.tfvars.example`
- ✅ `scripts/key-management/azure-keyvault-setup.sh`
- ✅ `scripts/deployment/populate-env.sh`
- ✅ `scripts/deployment/get-env-values.sh`
- ✅ `scripts/deployment/verify-env.sh`

### Environment Variable

Update your `.env` file:

```bash
AZURE_LOCATION=westeurope
```

Or let it use the default (westeurope).

## Verification Scripts

### Check All Prerequisites

```bash
./scripts/azure/check-azure-prerequisites.sh
```

This script:
- Lists all commercial regions (non-US, non-Government)
- Checks resource provider registration
- Registers missing providers
- Checks quotas for key regions

### Check Quotas for Specific Region

```bash
./scripts/azure/check-quotas.sh westeurope
```

Or for other regions:

```bash
./scripts/azure/check-quotas.sh northeurope
./scripts/azure/check-quotas.sh francecentral
```

### List All Commercial Regions

```bash
az account list-locations \
  --query "[?metadata.regionType=='Physical' && !contains(name, 'us') && !contains(name, 'gov') && !contains(name, 'dod')].{Name:name, DisplayName:displayName}" \
  -o table
```

### Check Resource Provider Status

```bash
az provider list --query "[?registrationState=='Registered'].namespace" -o table
```

### Register Missing Providers

```bash
for provider in Microsoft.ContainerService Microsoft.Network Microsoft.Compute; do
  az provider register --namespace "$provider" --wait
done
```

## Multi-Region Configuration

For multi-region deployments, the default regions are:

```hcl
regions = ["westeurope", "northeurope", "francecentral"]
```

These can be customized in `terraform/modules/multi-region/region-config.tf`.

## Next Steps

1. ✅ Default region set to `westeurope`
2. ✅ All commercial regions listed
3. ✅ Resource providers registered
4. ⚠️ Review VM quotas and request increases if needed
5. ✅ Update `.env` with `AZURE_LOCATION=westeurope` (optional, already default)
6. ✅ Ready for deployment

## References

- [Azure Regions](https://azure.microsoft.com/global-infrastructure/geographies/)
- [Resource Provider Registration](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-providers-and-types)
- [Azure Quotas](https://docs.microsoft.com/azure/azure-resource-manager/management/azure-subscription-service-limits)

