Skip to content

Repository files navigation

AzureRegionSelector

AzureRegionSelector

Validate Refresh reference data License: MIT

Turn workload requirements into an explainable Azure region shortlist.

AzureRegionSelector inventories a workload, applies hard constraints, scores the remaining Azure regions against weighted criteria, and produces a reviewable decision record in Markdown, CSV, and JSON.

It does not claim that one region is permanently "best." A region recommendation is dated: service coverage, SKU availability, capacity, architecture, and business priorities change.

Quick start

az login
git clone https://github.com/prbeegala/AzureRegionSelector.git
cd AzureRegionSelector

./Select-AzureRegion.ps1 -SourceRegion northeurope

The source region is excluded by default, so the output focuses on alternatives. To include it as a baseline, add -IncludeSourceRegion.

Use the synthetic sample inventory

./Select-AzureRegion.ps1 -SourceRegion northeurope `
    -InventoryFile ./examples/inventories/northeurope.csv `
    -OutputDirectory ./out

This avoids querying your deployed resources, but Azure CLI sign-in is still required for current region and provider metadata.

Add hard constraints

./Select-AzureRegion.ps1 -SourceRegion northeurope `
    -InventoryFile ./examples/inventories/northeurope.csv `
    -DataResidency Europe `
    -RequiredZoneCount 2 `
    -MinCoverage 90 `
    -OutputDirectory ./out

Use -RequiredZoneCount 2 or 3 deliberately. Zone topology is a component-level architecture decision; the selector only enforces the workload-level floor you provide.

Change the decision profile

./Select-AzureRegion.ps1 -SourceRegion northeurope `
    -InventoryFile ./examples/inventories/northeurope.csv `
    -WeightsProfile cost_optimised `
    -OutputDirectory ./out

Built-in profiles:

  • default
  • cost_optimised
  • latency_critical
  • capacity_first
  • critical_prod

Bring your own weights with -WeightsFile.

Decision model

Stage Purpose Examples
1. Eliminate Apply non-negotiable constraints Geography, required zone count, minimum service coverage, known capacity restrictions
2. Rank Compare eligible regions Coverage, latency, price, egress, AZ support, SKU portability, maturity
3. Record Make the recommendation reviewable Inputs, weights, data dates, unknowns, per-criterion scores, rejection reasons

The main command writes:

region-selection-<source>.md
region-selection-<source>.csv
region-selection-<source>.json

See the checked-in North Europe example before running the selector.

What the selector evaluates

Criterion Treatment Evidence
Geography and data residency Hard filter Azure region metadata + your policy
Service/resource-type coverage Score with optional hard floor Azure Resource Graph inventory + ARM provider metadata
Required zone count Optional hard filter Region AZ metadata; validate service/SKU deployment separately
Capacity status Score or hard filter when supplied Optional customer/account-team CSV
Inter-region latency Weighted score Public Azure latency snapshot
Compute price delta Weighted score Azure Retail Prices API
Cross-region egress Weighted score Public bandwidth rates
SKU portability Weighted score Weekly-refreshed SKU snapshot
Region maturity Weighted score Azure region metadata
Regional-pair topology Decision context Azure paired-region metadata

The full rationale and source catalogue are in docs/decision-framework.md.

Interpret the output responsibly

  • Treat the top group as candidates, not an oracle. Small score differences are usually sensitivity, not certainty.
  • Unknown capacity is not available capacity. If the optional capacity file is empty, every region receives a neutral capacity score.
  • Weights express ownership. The workload or architecture decision owner should approve them.
  • Freshness matters. SKU snapshots older than 30 days are ignored in favour of the conservative fallback heuristic, and evidence dates are recorded in the output.
  • Validate the deployable configuration. Region-level service and AZ metadata do not guarantee that a specific SKU, quota, feature, or zone is available at the required scale.

Companion tools

Command Purpose
tools/Test-AzureRegionCoverage.ps1 Compare workload resource-type coverage across regions or validate one target
tools/Get-AzureRegionServices.ps1 Generate a service/provider availability catalogue for a geography
tools/Get-AzureRegionSkus.ps1 Refresh the canonical SKU-by-region reference snapshot; see SKU data sources

Repository layout

AzureRegionSelector/
├── Select-AzureRegion.ps1
├── tools/
├── data/
├── docs/
├── examples/
├── assets/
└── .github/workflows/

Safety and privacy

  • All scripts are read-only against Azure.
  • They query Azure Resource Graph, ARM metadata, and public pricing endpoints.
  • No customer inventory is committed by the project.
  • The checked-in example inventory is synthetic.
  • Never commit a populated capacity-status file; current capacity evidence can be engagement-specific.

Requirements

  • PowerShell 5.1+ or PowerShell 7+
  • Azure CLI
  • An authenticated Azure CLI context (az login)
  • Reader access for any scope you inventory

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md.

MIT licensed.

About

Explainable, data-driven Azure region selection using workload constraints, weighted criteria, and current service/SKU data.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages