A PowerShell script to analyze Classic Azure Front Door (AFD) resources and assess migration readiness to Standard or Premium tiers.
This script parses JSON exports of Classic Azure Front Door resources and provides:
- Detailed inventory of backend pools, backends, custom domains, and routing rules
- Mapping to equivalent Premium/Standard Front Door constructs
- Complete limit analysis for both Standard and Premium tiers
- Clear warnings about migration blockers
- Actionable recommendations for resources exceeding limits
✅ Complete Limit Checking
- All Standard tier limits (Custom Domains, Origin Groups, Origins, Routes, Rule Sets)
- All Premium tier limits
- Per-pool origin limits (50 origins per group)
- Per-ruleset limits (100 rules per set)
✅ Clear Output
- Color-coded warnings (Green = OK, Yellow = Warning, Red = Critical)
- Migration verdict with specific action items
- Detailed resource breakdown
✅ Simple & Maintainable
- Direct JSON property access (no complex recursion)
- Clean, linear logic flow
- Easy to extend for additional checks
- PowerShell 5.1 or later
- Azure Front Door resource exported to JSON
Using Azure CLI:
az network front-door show --name <your-frontdoor-name> --resource-group <your-rg> > frontdoor-export.jsonUsing Azure PowerShell:
Get-AzFrontDoor -Name <your-frontdoor-name> -ResourceGroupName <your-rg> | ConvertTo-Json -Depth 10 | Out-File frontdoor-export.json.\get-afdstructure.ps1 -JsonFile ".\frontdoor-export.json"=== Backend Pools and Backends ===
Pool: production-pool-01 Backends: 10
- 10.0.1.10
- 10.0.1.11
...
=== Custom Domains (FrontendEndpoints) ===
Name: www-example-com Hostname: www.example.com
Name: api-example-com Hostname: api.example.com
====================================
Classic Front Door - Resource Summary
====================================
Total FrontendEndpoints : 40
Total Backend Pools : 98
Total Backends : 342
Total RoutingRules : 54
Total RulesEngines : 21
====================================
Premium/Standard Front Door - Equivalent Resources
====================================
Custom Domains (from FrontendEndpoints) : 40
Origin Groups (from Backend Pools) : 98
Origins (from Backends) : 342
Routes (from RoutingRules) : 54
Rule Sets (from RulesEngines) : 21
====================================
Migration Limit Analysis
====================================
Standard Tier:
--------------
❌ Origins: 342 exceeds limit of 100
Premium Tier:
-------------
❌ Origins: 342 exceeds limit of 200
====================================
⚠️ Migration Issues Detected
Review the warnings above before proceeding with migration.
====================================
- Custom Domains: 100
- Origin Groups: 100
- Origins per Profile: 100
- Routes: 100
- Rule Sets: 100
- Custom Domains: 500
- Origin Groups: 200
- Origins per Profile: 200
- Routes: 200
- Rule Sets: 200
- Origins per Group: 50
- Rules per Rule Set: 100
| Classic Front Door | Standard/Premium Front Door |
|---|---|
| Frontend Endpoint | Custom Domain |
| Backend Pool | Origin Group |
| Backend | Origin |
| Routing Rule | Route |
| Rules Engine | Rule Set |
get-afdstructure.ps1- Main analysis script.gitignore- Git configurationTests/- Folder for test JSON files (not tracked by Git)
Place your Front Door JSON exports in the Tests/ folder:
.\get-afdstructure.ps1 -JsonFile ".\Tests\your-frontdoor.json"Your Classic Front Door can be migrated to both Standard and Premium tiers without changes.
If resources exceed Standard limits but fit within Premium limits, migrate to Premium tier.
- Pool with >50 origins: Split into multiple origin groups before migration
- Rule Engine with >100 rules: Split into multiple rule sets before migration
Requires architecture redesign before migration. Consider:
- Consolidating duplicate origins
- Splitting into multiple Front Door profiles
- Reviewing if all resources are actively used
Improvements and bug reports are welcome! Please ensure:
- All limit checks remain functional
- Output remains clear and actionable
- Code stays simple and maintainable
This script is provided as-is for Azure Front Door migration assessment purposes.