.github/skills/azure-apim-architecture/SKILL.md
Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.
npx skillsauth add thomast1906/github-copilot-agent-skills azure-apim-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides comprehensive guidance on Azure API Management architecture patterns for enterprise API marketplaces, including component selection, network topology, cost optimization, and design decision rationale.
Activate this skill when users ask questions related to:
Decision: Use Azure Front Door Premium as ingress layer
Rationale:
Cost: £378/month (UK South) vs Application Gateway WAF v2 ~£350/month (similar cost, AFD offers more features)
Microsoft Docs: Azure Front Door Overview
Alternatives Rejected:
Decision: Deploy all APIM instances in VNet Internal mode
Rationale:
Microsoft Guidance:
"Use the internal VNet mode when you want to expose your API Management instance only to clients within the VNet. This mode provides maximum security by ensuring the gateway and management endpoints are accessible only via private IPs." - APIM VNet Modes
Network Flow:
Internet User → Azure Front Door (WAF, DDoS)
↓ Private Link (Azure backbone, no internet)
APIM Internal Endpoint (10.1.1.4, no public IP)
↓ VNet connectivity
Backend APIs (within VNet or peered VNets)
Key Implications:
10.1.1.4 (internal IP only, not registered in public DNS)azure-api.net resolves to internal IP within VNetExternal Mode Rejected:
Microsoft Docs: APIM VNet Integration
Decision: Use 3 separate APIM instances for dev/test/prod, not workspaces within a single instance
Rationale:
Microsoft Guidance:
"Workspaces provide logical isolation within a single API Management instance for organizing APIs, products, and subscriptions by team or project. They're ideal for multi-tenant scenarios within the same environment, but don't provide compute or infrastructure isolation." - APIM Workspaces
Cost Comparison: | Approach | Dev | Test | Prod | Total | |----------|-----|------|------|-------| | Separate Instances (recommended) | £45 | £45 | £1,944 | £2,034/mo | | Workspaces in Single Premium | £648* | £648* | £648* | £1,944/mo |
*Workspaces share same Premium instance cost (£1,944/month), lack infrastructure isolation
When to Use Workspaces:
Configuration:
Development:
- APIM: apim-api-marketplace-dev-uks (Developer tier, 1 unit)
- VNet: vnet-dev-uks (10.0.0.0/16)
- Cost: £45/month + supporting services (~£55) = ~£100/month total
Test:
- APIM: apim-api-marketplace-test-uks (Developer tier, 1 unit)
- VNet: vnet-test-uks (10.1.0.0/16)
- Cost: £45/month + supporting services (~£55) = ~£100/month total
Production:
- APIM: apim-api-marketplace-prod-uks (Premium tier, 3 units, zone-redundant)
- VNet: vnet-prod-uks (10.2.0.0/16)
- Cost: £1,944/month + Front Door £378 + monitoring £270 + API Center £135 + other = ~£3,230/month
Microsoft Docs: APIM Workspaces Overview
Decision: Use hybrid authentication strategy - OAuth 2.0 for sensitive/internal APIs, subscription keys for simple public APIs
Rationale:
sub claim) or per-subscription (shared keys)Authentication Decision Matrix: | API Type | Auth Method | Justification | Example | |----------|-------------|---------------|---------| | Public Read-Only | Subscription Keys | Low security risk, easy onboarding, no PII | Weather API, Public Holidays | | Internal Corporate | OAuth 2.0 (Entra ID) | User identity required, RBAC, audit trail | Employee Directory, HR Systems | | Sensitive Public | OAuth 2.0 (Entra External ID B2C) | Handles PII/financial, user consent | Payment Processing, Health Records | | Partner B2B | OAuth 2.0 Client Credentials | Machine-to-machine, mTLS optional | Order Management, Inventory Sync |
Rate Limiting Strategy:
sub claim from JWT)Policy Implementation (abbreviated):
<choose>
<when condition="@(context.Request.Headers.GetValueOrDefault('Authorization','').StartsWith('Bearer'))">
<validate-jwt header-name="Authorization">
<openid-config url="https://login.microsoftonline.com/{tenant}/v2.0/.well-known/openid-configuration" />
</validate-jwt>
<rate-limit-by-key calls="1000" renewal-period="3600"
counter-key="@(context.Request.Headers.GetValueOrDefault('Authorization','').AsJwt()?.Subject)" />
</when>
<otherwise>
<check-header name="Ocp-Apim-Subscription-Key" />
<rate-limit-by-key calls="500" renewal-period="3600"
counter-key="@(context.Subscription.Key)" />
</otherwise>
</choose>
Microsoft Docs: Protect backend with Entra ID
Decision: Deploy Azure API Center (Standard tier) at £135/month for centralized API governance
Rationale:
Microsoft Guidance:
"Azure API Center enables organizations to develop and maintain a structured and standardized API inventory. API Center enables tracking all APIs in the organization, along with their versions, deployments, and dependencies." - API Center Overview
When API Center Adds Value:
When You DON'T Need API Center:
Key Features Used:
Cost: Standard tier £135/month UK South (includes unlimited APIs, compliance, linting)
Microsoft Docs: API Center Overview
Decision: Deploy all resources in UK South only, no multi-region/DR to other regions
Rationale:
High Availability Strategy (Single-Region):
When Multi-Region WOULD Be Needed:
DR Strategy (Without Multi-Region Active-Active):
Cost Avoidance: Saves ~£2,100/month by staying single-region
Microsoft Docs: APIM High Availability
| Environment | APIM Tier | Monthly Cost | |-------------|-----------|--------------| | Development | Developer | ~£100 | | Test | Developer | ~£100 | | Production | Premium (3u) | ~£3,230 | | TOTAL | | ~£3,430/month (~£41,160/year) |
| Component | Configuration | Monthly Cost | |-----------|--------------|--------------| | API Management (Premium) | 3 units (zone-redundant) | £1,944 | | Azure Front Door (Premium) | 100GB, 1M requests | £378 | | Microsoft Entra ID (P2) | 100 users | £270 | | Entra External ID (B2C) | 50k MAU | £0 (free tier) | | Azure Monitor + App Insights | 100GB logs | £270 | | Azure API Center | Standard | £135 | | VNet + Private Link | 10 endpoints | £90 | | Key Vault + Misc | | £143 |
Total Architectural Savings: ~£5,850/month through design optimization
Ask yourself:
Match question to relevant section above:
Format response with:
Always reference:
DESIGN_DECISIONS_REFERENCE.md (for "why" with alternatives)ARCHITECTURE_DESIGN.md (for "how" with technical details)When discussing any component, always mention:
User: "Should I use Azure Front Door or Application Gateway?"
Response using this skill:
## Recommendation: Azure Front Door Premium
**Decision**: Use Azure Front Door Premium as ingress layer
**Rationale**:
- Built-in DDoS protection (platform-level, saves £2,644/month vs separate Azure DDoS Standard)
- Private Link support to APIM (secure backend connectivity without public internet)
- Global load balancing capabilities (future-proof for expansion)
- WAF with managed OWASP rulesets
- Better optimized for API workloads (lower latency)
**Cost Comparison**:
- Azure Front Door Premium: £378/month
- Application Gateway WAF v2: ~£350/month
- Similar cost, but AFD offers more features for API workloads
**Microsoft Documentation**:
[Azure Front Door Overview](https://learn.microsoft.com/azure/frontdoor/front-door-overview)
**Alternatives Considered**:
- Application Gateway: No global capabilities, requires separate DDoS (£2,644/mo), less suitable for API workloads
- Direct APIM exposure: Not secure, no DDoS layer
**Architecture Flow**:
Internet Users → Front Door (WAF, DDoS) → Private Link → APIM (VNet Internal) → Backends
**Documentation**: See DESIGN_DECISIONS_REFERENCE.md Section 1.1 for complete analysis
User: "What's the total cost for all three environments?"
Response using this skill:
## Total Cost: All Environments (GBP UK South)
| Environment | APIM Tier | Monthly Cost |
|-------------|-----------|--------------|
| Development | Developer | ~£100 |
| Test | Developer | ~£100 |
| Production | Premium (3u) | ~£3,230 |
| **TOTAL** | | **~£3,430/month** (~£41,160/year) |
### Production Environment Detail (£3,230/month)
APIM Premium (3u): £1,944
Azure Front Door: £378
Entra ID P2: £270
Monitoring: £270
API Center: £135
VNet + Private Link: £90
Misc: £143
### Cost Optimization Highlights
- Developer tier for dev/test: **Saves £1,206/month** (93% vs Premium)
- No separate DDoS: **Saves £2,644/month** (Front Door includes platform DDoS)
- Single region: **Saves £1,944/month** (no multi-region APIM)
- Entra External ID free tier: **Saves £1,000+/month** (vs paid auth solution)
**Total Architectural Savings**: ~£5,850/month through design optimization
**Documentation**: See ARCHITECTURE_DESIGN.md Section 9.1 for detailed cost breakdown
Skill Version: 1.0
Last Updated: 29 January 2026
Primary Documents: DESIGN_DECISIONS_REFERENCE.md, ARCHITECTURE_DESIGN.md
Related MCP Tools: azure_documental search, azure_bestpractices
development
Assess Azure architectures against Well-Architected Framework (WAF) five pillars - Reliability, Security, Cost Optimization, Operational Excellence, and Performance Efficiency. Provide scores and recommendations.
devops
Safe Terraform provider upgrades with automatic resource migration, breaking change detection, and state management using moved blocks. Use when upgrading provider versions, handling removed resources, migrating deprecated syntax, or performing major version upgrades.
development
Comprehensive skills for creating, compiling, debugging, and managing GitHub Agentic Workflows (gh-aw) with best practices and common patterns
tools
Create and edit diagrams on a live Excalidraw canvas using the Excalidraw MCP server. Use when asked to draw, diagram, sketch, or visualise architectures, workflows, data flows, system designs, flowcharts, mind maps, or sequence diagrams. Trigger phrases include "create an excalidraw", "draw me a diagram", "make a flowchart", "visualise the system", "diagram this architecture", "export to PNG/SVG". Can export to PNG, SVG, .excalidraw file, or a shareable URL. Do NOT use for Draw.io or diagrams.net output (use drawio-mcp-diagramming instead).