The APIM Accelerator is a production-ready Azure landing zone accelerator that deploys a complete API Management platform using Bicep Infrastructure-as-Code templates and Azure Developer CLI (azd). It provides enterprise teams with a standardized, repeatable foundation for governing, publishing, and monitoring APIs at scale on Azure.
The accelerator follows a modular architecture organized into three deployment layers β shared monitoring infrastructure, core API Management platform, and API inventory governance β each orchestrated through a single subscription-level Bicep template. Deploy the entire solution with a single azd up command, receiving a fully configured API Management instance with integrated monitoring, developer portal, workspaces for team isolation, and centralized API governance through Azure API Center.
Note
This accelerator deploys Azure API Management with the Premium SKU by default, which enables features such as multi-region deployments, VNet integration, and workspaces. Review the Configuration section to adjust the SKU tier for non-production environments.
- π Overview
- ποΈ Architecture
- β¨ Features
- π Requirements
- π Quick Start
- π’ Deployment
- βοΈ Configuration
- π Project Structure
- π‘ Usage
- π§ Troubleshooting
- π€ Contributing
- π License
The solution uses a layered deployment model at Azure subscription scope. The orchestration template (infra/main.bicep) creates a resource group and deploys three module layers in sequence, with each layer building on the outputs of the previous one.
---
title: "APIM Accelerator - Landing Zone Architecture"
config:
theme: base
look: classic
layout: dagre
themeVariables:
fontSize: '16px'
flowchart:
htmlLabels: true
---
flowchart TB
accTitle: APIM Accelerator Landing Zone Architecture
accDescr: Shows the three-layer deployment architecture with shared monitoring, core API Management platform, and API inventory governance components
%% βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
%% AZURE / FLUENT ARCHITECTURE PATTERN v1.1
%% (Semantic + Structural + Font + Accessibility Governance)
%% βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
%% PHASE 1 - STRUCTURAL: Direction explicit, flat topology, nesting β€ 3
%% PHASE 2 - SEMANTIC: Colors justified, max 5 semantic classes, neutral-first
%% PHASE 3 - FONT: Dark text on light backgrounds, contrast β₯ 4.5:1
%% PHASE 4 - ACCESSIBILITY: accTitle/accDescr present, icons on all nodes
%% PHASE 5 - STANDARD: Governance block present, classDefs centralized
%% βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
subgraph azure["βοΈ Azure Subscription"]
direction TB
subgraph rg["π¦ Resource Group: apim-accelerator-env-region-rg"]
direction TB
subgraph shared["π Shared Infrastructure Layer"]
direction LR
law["π Log Analytics Workspace"]:::monitoring
ai["π Application Insights"]:::monitoring
sa["ποΈ Storage Account"]:::data
end
subgraph core["βοΈ Core Platform Layer"]
direction LR
apim["π API Management"]:::primary
ws["π’ Workspaces"]:::primary
dp["π₯οΈ Developer Portal"]:::primary
end
subgraph inventory["π Inventory Layer"]
direction LR
ac["π API Center"]:::success
acsrc["π API Source Integration"]:::success
end
end
end
shared --> core
core --> inventory
law --> apim
ai --> apim
sa --> apim
apim --> ws
apim --> dp
apim --> ac
ac --> acsrc
%% Subgraph styling (5 subgraphs = 5 style directives)
style azure fill:#F3F2F1,stroke:#605E5C,stroke-width:2px,color:#323130
style rg fill:#FAFAFA,stroke:#8A8886,stroke-width:2px,color:#323130
style shared fill:#DEECF9,stroke:#0078D4,stroke-width:2px,color:#004578
style core fill:#FFF4CE,stroke:#FFB900,stroke-width:2px,color:#986F0B
style inventory fill:#DFF6DD,stroke:#107C10,stroke-width:2px,color:#0B6A0B
%% classDef declarations (centralized at end for pattern compliance)
classDef primary fill:#FFF4CE,stroke:#FFB900,stroke-width:2px,color:#986F0B
classDef monitoring fill:#DEECF9,stroke:#0078D4,stroke-width:2px,color:#004578
classDef data fill:#F3F2F1,stroke:#8A8886,stroke-width:2px,color:#323130
classDef success fill:#DFF6DD,stroke:#107C10,stroke-width:2px,color:#0B6A0B
Component Roles:
| Layer | Component | Purpose |
|---|---|---|
| π Shared | Log Analytics Workspace | Centralized log aggregation and KQL-based analysis |
| π Shared | Application Insights | Application performance monitoring and distributed tracing |
| π Shared | Storage Account | Long-term diagnostic log archival and compliance retention |
| βοΈ Core | API Management | API gateway, policies, rate limiting, and caching |
| βοΈ Core | Workspaces | Logical API isolation for multi-team environments |
| βοΈ Core | Developer Portal | Self-service API discovery with Azure AD authentication |
| π Inventory | API Center | Centralized API catalog, governance, and compliance |
| π Inventory | API Source Integration | Automatic API discovery and synchronization from APIM |
The accelerator provides a comprehensive API Management landing zone with enterprise-grade capabilities spanning governance, security, monitoring, and developer experience. Each feature is implemented as a modular Bicep component that can be customized independently.
These capabilities address the key challenges of API platform management at scale β from consistent infrastructure provisioning and identity management to centralized API discovery and compliance enforcement β enabling platform teams to onboard API producers and consumers efficiently.
| Feature | Description | Status |
|---|---|---|
| π API Management Service | Configurable APIM deployment with support for all SKU tiers (Developer through Premium) | β Stable |
| π’ Workspace Isolation | Logical API grouping for multi-team environments within a single APIM instance | β Stable |
| π₯οΈ Developer Portal | Self-service portal with Azure AD authentication, CORS policies, and terms of service | β Stable |
| π API Center Governance | Centralized API inventory, documentation, and compliance management via Azure API Center | β Stable |
| π Automatic API Discovery | API source integration that synchronizes APIs from APIM to API Center automatically | β Stable |
| π Centralized Monitoring | Log Analytics + Application Insights + Storage Account for full-stack observability | β Stable |
| π Managed Identity | System-assigned and user-assigned managed identity support across all components | β Stable |
| π RBAC Assignments | Automated role assignments for API Center Data Reader and Compliance Manager roles | β Stable |
| π One-Command Deployment | Full landing zone deployment via azd up with pre-provision automation hooks |
β Stable |
| π·οΈ Resource Tagging | Comprehensive tagging strategy for cost tracking, governance, and compliance | β Stable |
| π Multi-Environment Support | Environment-based configuration (dev, test, staging, prod, uat) with consistent naming | β Stable |
| π‘οΈ VNet Integration | Optional virtual network integration for private API gateway deployments (Premium SKU) | π Planned |
Before deploying the APIM Accelerator, ensure your environment meets the prerequisites below. The accelerator requires an active Azure subscription with sufficient permissions to create resources at the subscription scope, along with local tooling for infrastructure deployment.
These requirements are the minimum needed for a successful deployment. The Azure Developer CLI handles most of the orchestration, while the Bicep templates are compiled and deployed automatically during provisioning.
| Requirement | Details | Required |
|---|---|---|
| βοΈ Azure Subscription | Active Azure subscription with Owner or Contributor + User Access Administrator roles | β Yes |
| π Azure CLI | Version 2.50+ β used for authentication and resource management | β Yes |
| π οΈ Azure Developer CLI | Version 1.0+ β orchestrates provisioning and deployment via azd up |
β Yes |
| π¦ Bicep CLI | Version 0.20+ β compiles Bicep templates (bundled with Azure CLI) | β Yes |
| π Bash Shell | Required for pre-provision hook scripts (Git Bash on Windows, native on macOS/Linux) | β Yes |
| π Azure AD Permissions | App registration permissions required for developer portal Azure AD integration | |
| π Azure Region | Region that supports API Management Premium tier and API Center | β Yes |
Tip
On Windows, you can use Git Bash or Windows Subsystem for Linux (WSL) to run the pre-provision shell scripts included in this accelerator.
Get the APIM Accelerator deployed in your Azure subscription with three commands. This minimal workflow provisions all infrastructure components including API Management, monitoring, and API Center governance.
-
Clone the repository
git clone https://github.com/Evilazaro/APIM-Accelerator.git cd APIM-Accelerator -
Authenticate with Azure
azd auth login
-
Deploy the landing zone
azd up
When prompted, provide:
- Environment name: A short identifier (e.g.,
dev,prod) used in resource naming - Azure location: The target region (e.g.,
eastus,westeurope) - Environment type: One of
dev,test,staging,prod, oruat
- Environment name: A short identifier (e.g.,
Important
API Management Premium SKU provisioning can take 30-45 minutes. The azd up command will wait for all resources to be fully deployed before completing.
The accelerator supports multiple deployment workflows depending on your needs. Use azd up for a full end-to-end deployment, or use individual commands for more granular control over the provisioning process.
azd upThis single command executes the following sequence:
- Runs the pre-provision hook (
infra/azd-hooks/pre-provision.sh) to purge any soft-deleted APIM instances in the target region - Provisions all Azure resources defined in
infra/main.bicep - Creates the resource group following the naming convention
apim-accelerator-{env}-{location}-rg - Deploys shared monitoring infrastructure (Log Analytics, Application Insights, Storage)
- Deploys core API Management platform with workspaces and developer portal
- Deploys API Center with APIM integration for API inventory governance
azd provisionProvisions Azure infrastructure without deploying application code.
az deployment sub create \
--location <region> \
--template-file infra/main.bicep \
--parameters envName=<dev|test|staging|prod|uat> location=<azure-region>The pre-provision script automatically purges soft-deleted APIM instances to prevent naming conflicts during redeployment:
./infra/azd-hooks/pre-provision.sh <location>All environment-specific configuration is centralized in infra/settings.yaml, which controls resource naming, SKU tiers, identity settings, tagging strategies, monitoring parameters, and component-level tuning. The orchestration template loads this file at deploy time and distributes settings to each module. Empty name fields trigger automatic name generation using the solution name and a deterministic unique suffix derived from the subscription and resource group.
The configuration is organized into four sections β global settings, shared infrastructure, core platform, and inventory services β each mapping directly to the corresponding deployment module. Additional parameters for networking, developer portal authentication, and Application Insights tuning are available as Bicep parameters in their respective modules.
The primary configuration file is infra/settings.yaml:
# Solution identifier used for naming conventions and resource grouping
solutionName: "apim-accelerator"
# Shared services configuration - monitoring, logging, and diagnostics
shared:
monitoring:
logAnalytics:
name: "" # Leave empty for auto-generation
workSpaceResourceId: "" # Set to reuse an existing workspace
identity:
type: "SystemAssigned" # Options: SystemAssigned, UserAssigned
userAssignedIdentities: [] # Resource IDs for user-assigned identities
applicationInsights:
name: "" # Leave empty for auto-generation
logAnalyticsWorkspaceResourceId: "" # Linked workspace (auto-linked if empty)
tags:
lz-component-type: "shared"
component: "monitoring"
tags:
CostCenter: "CC-1234" # Cost allocation tracking
BusinessUnit: "IT" # Business unit or department
Owner: "your-email@example.com" # Resource/application owner
ApplicationName: "APIM Platform" # Workload/application name
ProjectName: "APIMForAll" # Project or initiative name
ServiceClass: "Critical" # Workload tier: Critical, Standard, Experimental
RegulatoryCompliance: "GDPR" # Compliance: GDPR, HIPAA, PCI, None
SupportContact: "your-email@example.com" # Incident support contact
ChargebackModel: "Dedicated" # Chargeback/Showback model
BudgetCode: "FY25-Q1-InitiativeX" # Budget or initiative code
# Core platform configuration - API Management service
core:
apiManagement:
name: "" # Leave empty for auto-generation
publisherEmail: "admin@example.com" # Required by Azure
publisherName: "Contoso" # Organization name in developer portal
sku:
name: "Premium" # Options: Developer, Basic, BasicV2, Standard, StandardV2, Premium, Consumption
capacity: 1 # Scale units (Premium: 1-10, Standard: 1-4)
identity:
type: "SystemAssigned" # Options: SystemAssigned, UserAssigned, None
userAssignedIdentities: [] # Resource IDs for user-assigned identities
workspaces:
- name: "workspace1" # Add more entries for multi-team isolation
tags:
lz-component-type: "core"
component: "apiManagement"
# Inventory configuration - API Center governance
inventory:
apiCenter:
name: "" # Leave empty for auto-generation
identity:
type: "SystemAssigned" # Options: SystemAssigned, UserAssigned, SystemAssigned+UserAssigned, None
userAssignedIdentities: [] # Resource IDs for user-assigned identities
tags:
lz-component-type: "shared"
component: "inventory"The deployment accepts two parameters via infra/main.parameters.json:
| Parameter | Description | Allowed Values |
|---|---|---|
βοΈ envName |
Environment identifier used in resource naming and tagging | dev, test, staging, prod, uat |
π location |
Azure region for all resource deployments | Any region supporting API Management and API Center |
Settings under core.apiManagement control the APIM service deployment. The APIM module (src/core/apim.bicep) also exposes additional parameters for networking and portal behavior.
| Setting | Path / Parameter | Description | Default | Allowed Values |
|---|---|---|---|---|
| π Service Name | core.apiManagement.name |
APIM instance name; leave empty for auto-generation using {solutionName}-{uniqueSuffix}-apim |
Auto-generated | Any valid APIM name |
| π·οΈ SKU Tier | core.apiManagement.sku.name |
Pricing tier determining features, SLA, and scaling limits | Premium |
Developer, Basic, BasicV2, Standard, StandardV2, Premium, Consumption, Isolated |
| π Scale Units | core.apiManagement.sku.capacity |
Number of scale units (affects throughput and cost) | 1 |
1β10 (Premium), 1β4 (Standard) |
| π§ Publisher Email | core.apiManagement.publisherEmail |
Contact email displayed in developer portal and notifications | Required | Valid email address |
| π’ Publisher Name | core.apiManagement.publisherName |
Organization name shown in developer portal | Required | Any string |
| π Identity Type | core.apiManagement.identity.type |
Managed identity for Azure service authentication | SystemAssigned |
SystemAssigned, UserAssigned, None |
| π User Identities | core.apiManagement.identity.userAssignedIdentities |
Resource IDs of pre-created user-assigned identities | [] |
Array of ARM resource IDs |
| π Public Network Access | publicNetworkAccess (Bicep param) |
Allow public internet access to the APIM gateway | true |
true, false |
| π‘οΈ VNet Integration | virtualNetworkType (Bicep param) |
Network mode for private deployments | None |
None, External, Internal |
| π Subnet ID | subnetResourceId (Bicep param) |
Subnet resource ID for VNet integration | "" |
Valid ARM subnet resource ID |
| π₯οΈ Developer Portal | enableDeveloperPortal (Bicep param) |
Enable or disable the self-service developer portal | true |
true, false |
Note
The publicNetworkAccess, virtualNetworkType, subnetResourceId, and enableDeveloperPortal parameters are Bicep-level parameters in src/core/apim.bicep. To customize them, pass values through the module call in src/core/main.bicep or override via a parameters file.
Workspaces provide logical isolation for APIs within a single APIM instance. Each workspace entry in the settings creates a separate Microsoft.ApiManagement/service/workspaces resource.
core:
apiManagement:
workspaces:
- name: "workspace1" # Default workspace
- name: "sales-apis" # Team-specific workspace
- name: "partner-apis" # External partner workspace| Setting | Description | Constraint |
|---|---|---|
| π’ Workspace Name | Identifier for the workspace (used as both resource name and display name) | Must be unique within the APIM instance |
Important
Workspaces require the Premium SKU tier. If a non-Premium SKU is configured, workspace deployment will fail. Use the Developer SKU only for non-production environments that do not need workspace isolation.
The developer portal module (src/core/developer-portal.bicep) configures Azure AD as the identity provider, CORS policies, and sign-in/sign-up settings. Customization requires editing the Bicep module directly.
| Setting | Location | Description | Default |
|---|---|---|---|
| π Client ID | clientId param in developer-portal.bicep |
Azure AD app registration client ID (36-char GUID) | Passed from APIM identity output |
| π Client Secret | clientSecret param in developer-portal.bicep |
Azure AD app registration client secret | Passed from APIM identity output |
| π’ Allowed Tenants | allowedTenants variable in developer-portal.bicep |
Azure AD tenant domains permitted to sign in | ['MngEnvMCAP341438.onmicrosoft.com'] |
| π Identity Provider | identityProviderAuthority variable |
Azure AD authentication endpoint | login.windows.net |
| π Auth Library | identityProviderClientLibrary variable |
MSAL library version for authentication flows | MSAL-2 |
| β Sign-In Enabled | devPortalSignInSetting resource |
Allow user authentication via configured providers | true |
| π Sign-Up Enabled | devPortalSignUpSetting resource |
Allow new user registration | true |
| π Terms of Service | termsOfService property |
Require users to accept terms during registration | enabled: true, consentRequired: true |
| π CORS Origins | devPortalConfig resource |
Allowed origins for cross-origin requests | Developer portal URL, gateway URL, management API URL |
Warning
Update the allowedTenants array in src/core/developer-portal.bicep with your organization's Azure AD tenant domain(s) before deploying. The default value is a sample tenant and will not work for your environment.
Monitoring settings are split between infra/settings.yaml (for resource identity and naming) and the Bicep module defaults (for operational parameters).
| Setting | Path / Parameter | Description | Default |
|---|---|---|---|
| π Workspace Name | shared.monitoring.logAnalytics.name |
Custom name; leave empty for auto-generation | Auto-generated |
| π Existing Workspace | shared.monitoring.logAnalytics.workSpaceResourceId |
Reuse an existing workspace instead of creating one | "" (create new) |
| π Identity Type | shared.monitoring.logAnalytics.identity.type |
Managed identity for secure resource access | SystemAssigned |
| π User Identities | shared.monitoring.logAnalytics.identity.userAssignedIdentities |
User-assigned identity resource IDs | [] |
| π·οΈ SKU | skuName param in operational/main.bicep |
Log Analytics pricing tier | PerGB2018 |
Available Log Analytics SKU tiers:
| SKU | Use Case |
|---|---|
π PerGB2018 |
Pay-per-GB ingestion β most flexible, recommended for most workloads |
π° CapacityReservation |
Commitment-based pricing for high-volume scenarios (100+ GB/day) |
π Free |
Limited to 500 MB/day with 7-day retention β testing only |
π’ LACluster |
Dedicated cluster for 500+ GB/day scenarios |
| Setting | Path / Parameter | Description | Default |
|---|---|---|---|
| π Instance Name | shared.monitoring.applicationInsights.name |
Custom name; leave empty for auto-generation | Auto-generated |
| π Linked Workspace | shared.monitoring.applicationInsights.logAnalyticsWorkspaceResourceId |
Log Analytics workspace for data storage | Auto-linked |
| π¦ Application Kind | kind param in insights/main.bicep |
Type of application being monitored | web |
| π Application Type | applicationType param in insights/main.bicep |
Telemetry categorization | web |
| π Ingestion Mode | ingestionMode param in insights/main.bicep |
Where telemetry data is stored | LogAnalytics |
| π Retention (Days) | retentionInDays param in insights/main.bicep |
Data retention period (90β730 days) | 90 |
| π Public Ingestion | publicNetworkAccessForIngestion param |
Public network access for data ingestion | Enabled |
| π Public Query | publicNetworkAccessForQuery param |
Public network access for data queries | Enabled |
Tip
For production environments with strict security requirements, set both publicNetworkAccessForIngestion and publicNetworkAccessForQuery to Disabled and configure Azure Private Link for Application Insights.
A storage account is automatically provisioned for long-term diagnostic log archival. Its name is auto-generated using a centralized naming function to ensure global uniqueness.
| Setting | Value | Notes |
|---|---|---|
| ποΈ SKU | Standard_LRS |
Locally-redundant storage β cost-effective for diagnostic logs |
| π¦ Kind | StorageV2 |
Current-generation general-purpose storage |
| π Naming | Auto-generated | Uses generateStorageAccountName() with unique hash |
API Center provides centralized API governance, catalog, and compliance management. It automatically integrates with the deployed APIM instance for API discovery.
| Setting | Path | Description | Default |
|---|---|---|---|
| π API Center Name | inventory.apiCenter.name |
Custom name; leave empty for auto-generation using {solutionName}-apicenter |
Auto-generated |
| π Identity Type | inventory.apiCenter.identity.type |
Managed identity for API Center operations | SystemAssigned |
| π User Identities | inventory.apiCenter.identity.userAssignedIdentities |
User-assigned identity resource IDs | [] |
| π’ Default Workspace | Hardcoded in src/inventory/main.bicep |
Default workspace name for API organization | default |
Automatic RBAC assignments created for API Center:
| Role | Role Definition ID | Purpose |
|---|---|---|
| π API Center Data Reader | 71522526-b88f-4d52-b57f-d31fc3546d0d |
Read API definitions and metadata |
| π API Center Compliance Manager | 6cba8790-29c5-48e5-bab1-c7541b01cb04 |
Manage compliance and governance policies |
Tags defined under shared.tags are applied to all resources across the landing zone. Additional component-level tags are merged at deploy time.
| Tag | Purpose | Example Value |
|---|---|---|
π° CostCenter |
Cost allocation and chargeback tracking | CC-1234 |
π’ BusinessUnit |
Business unit or department identification | IT |
π€ Owner |
Resource/application owner email | admin@example.com |
π¦ ApplicationName |
Workload or application name | APIM Platform |
π ProjectName |
Project or initiative name | APIMForAll |
π·οΈ ServiceClass |
Workload tier classification | Critical, Standard, Experimental |
π‘οΈ RegulatoryCompliance |
Compliance framework applicable to the workload | GDPR, HIPAA, PCI, None |
π SupportContact |
Incident support team or contact email | support@example.com |
π³ ChargebackModel |
Chargeback/showback billing model | Dedicated, Shared |
π BudgetCode |
Budget or initiative tracking code | FY25-Q1-InitiativeX |
Additional component-level tags (lz-component-type, component) are automatically applied by each module to identify the landing zone layer (shared, core, inventory).
All resources follow a consistent naming pattern. When a name is left empty in infra/settings.yaml, the accelerator generates one automatically.
| Resource | Naming Pattern | Example |
|---|---|---|
| π¦ Resource Group | {solutionName}-{envName}-{location}-rg |
apim-accelerator-dev-eastus-rg |
| π API Management | {solutionName}-{uniqueSuffix}-apim |
apim-accelerator-a1b2c3-apim |
| π API Center | {solutionName}-apicenter |
apim-accelerator-apicenter |
| ποΈ Storage Account | {name}{uniqueHash}sa (max 24 chars) |
apimaccelsa7x2k |
| π Log Analytics | Auto-generated from solution name | apim-accelerator-{uniqueSuffix}-law |
| π Application Insights | Auto-generated from solution name | apim-accelerator-{uniqueSuffix}-ai |
Note
The uniqueSuffix is a deterministic hash derived from the subscription ID, resource group ID, resource group name, solution name, and location. This ensures names are globally unique but reproducible across repeated deployments to the same environment.
The repository follows a modular layout separating infrastructure orchestration (infra/) from source Bicep modules (src/). Each module is self-contained with explicit parameter contracts and documented dependencies.
APIM-Accelerator/
βββ azure.yaml # Azure Developer CLI project configuration
βββ LICENSE # MIT License
βββ infra/
β βββ main.bicep # Orchestration template (subscription scope)
β βββ main.parameters.json # Deployment parameters (envName, location)
β βββ settings.yaml # Environment-specific configuration
β βββ azd-hooks/
β βββ pre-provision.sh # Pre-provision: purge soft-deleted APIM
βββ src/
β βββ core/
β β βββ main.bicep # Core platform orchestrator
β β βββ apim.bicep # API Management service resource
β β βββ workspaces.bicep # APIM workspace resources
β β βββ developer-portal.bicep # Developer portal with Azure AD
β βββ inventory/
β β βββ main.bicep # API Center + APIM integration
β βββ shared/
β βββ main.bicep # Shared infrastructure orchestrator
β βββ common-types.bicep # Reusable Bicep type definitions
β βββ constants.bicep # Shared constants and utility functions
β βββ monitoring/
β β βββ main.bicep # Monitoring orchestrator
β β βββ insights/
β β β βββ main.bicep # Application Insights deployment
β β βββ operational/
β β βββ main.bicep # Log Analytics + Storage Account
β βββ networking/
β βββ main.bicep # Virtual network (placeholder)
After deployment, interact with the provisioned resources through the Azure portal, Azure CLI, or the developer portal. The following examples demonstrate common operational tasks across all provisioned components β API Management, developer portal, workspaces, monitoring, API Center, and networking.
After deployment completes, the API Management developer portal is available at:
https://{apim-name}.developer.azure-api.net
The developer portal is configured with Azure AD authentication. Users must sign in with an account from a tenant listed in the allowedTenants array in src/core/developer-portal.bicep. Update this array with your organization's tenant domain(s) before first use.
To customize sign-in and sign-up behavior:
- Disable self-registration β set the
enabledproperty on thedevPortalSignUpSettingresource tofalseinsrc/core/developer-portal.bicep - Remove terms of service β set
termsOfService.enabledtofalsein the same file - Add CORS origins β update the
originsarray in thedevPortalConfigresource to include additional frontend domains
To disable the developer portal entirely, set enableDeveloperPortal to false in the APIM module parameters.
Add, remove, or rename workspaces by updating the workspaces array in infra/settings.yaml:
core:
apiManagement:
workspaces:
- name: "workspace1"
- name: "sales-apis"
- name: "partner-apis"Then redeploy:
azd provisionImportant
Workspaces require the Premium SKU tier. If core.apiManagement.sku.name is set to a non-Premium SKU, workspace deployment will fail.
To deploy APIM behind a virtual network, override the Bicep parameters in src/core/main.bicep when calling the APIM module:
// External mode β gateway accessible via public IP, backend services via VNet
virtualNetworkType: 'External'
subnetResourceId: '/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}'
publicNetworkAccess: true
// Internal mode β gateway accessible only within the VNet
virtualNetworkType: 'Internal'
subnetResourceId: '/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/virtualNetworks/{vnet}/subnets/{subnet}'
publicNetworkAccess: falseUpdate the SKU and capacity in infra/settings.yaml:
core:
apiManagement:
sku:
name: "Standard" # Developer, Basic, BasicV2, Standard, StandardV2, Premium, Consumption
capacity: 2 # Scale unitsThen redeploy:
azd provisionNote
Changing from Premium to a lower SKU will remove workspace support and VNet integration capabilities. Plan accordingly.
All 10 governance tags under shared.tags in infra/settings.yaml are applied to every resource. Update them to match your organization's cost management and compliance requirements:
shared:
tags:
CostCenter: "CC-5678"
BusinessUnit: "Engineering"
Owner: "platform-team@contoso.com"
ApplicationName: "API Gateway"
ProjectName: "Digital Transformation"
ServiceClass: "Critical"
RegulatoryCompliance: "HIPAA"
SupportContact: "oncall@contoso.com"
ChargebackModel: "Shared"
BudgetCode: "FY26-Q2-APIProgram"Component-level tags (lz-component-type, component) are automatically added by each module and do not need manual configuration.
To connect to a pre-existing Log Analytics workspace instead of creating a new one, set the workSpaceResourceId property:
shared:
monitoring:
logAnalytics:
name: ""
workSpaceResourceId: "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.OperationalInsights/workspaces/{name}"Override Application Insights Bicep parameters in src/shared/monitoring/insights/main.bicep for production hardening:
| Parameter | Production Recommendation |
|---|---|
π
retentionInDays |
365 (up from default 90) |
π publicNetworkAccessForIngestion |
Disabled |
π publicNetworkAccessForQuery |
Disabled |
π ingestionMode |
LogAnalytics (default β recommended) |
Update the API Center managed identity in infra/settings.yaml:
inventory:
apiCenter:
identity:
type: "SystemAssigned" # Options: SystemAssigned, UserAssigned, SystemAssigned+UserAssigned, None
userAssignedIdentities:
- "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}"The API Center module automatically creates RBAC role assignments (Data Reader and Compliance Manager) for the API Center's managed identity on the connected APIM instance.
Access the Log Analytics workspace to query API Management diagnostic logs:
ApiManagementGatewayLogs
| where TimeGenerated > ago(1h)
| summarize count() by ResponseCode
| order by count_ descTrack request latencies by API:
ApiManagementGatewayLogs
| where TimeGenerated > ago(24h)
| summarize avg(TotalTime), percentile(TotalTime, 95), percentile(TotalTime, 99) by ApiId
| order by avg_TotalTime descBrowse the centralized API catalog in the Azure portal under the deployed API Center resource. APIs from the connected API Management instance are automatically discovered and synchronized through the APIM source integration configured in src/inventory/main.bicep.
Common issues and their resolutions when deploying or operating the APIM Accelerator.
| Issue | Cause | Resolution |
|---|---|---|
| β Name conflict during provisioning | Soft-deleted APIM instance with same name exists | Run ./infra/azd-hooks/pre-provision.sh <location> to purge |
| β Deployment timeout | Premium SKU provisioning exceeds default timeout | Wait 30-45 minutes; APIM Premium provisioning is expected to take time |
| Azure AD app registration misconfigured | Verify client ID, client secret, and allowed tenants in developer-portal.bicep |
|
| Insufficient permissions on subscription | Ensure the deploying identity has Owner or User Access Administrator role | |
| Non-Premium SKU selected | Workspaces require the Premium SKU tier β update core.apiManagement.sku.name |
|
| π§ Storage account name conflict | Globally unique name collision | Storage names are auto-generated using generateStorageAccountName() β redeploy with a different resource group name |
Contributions to the APIM Accelerator are welcome. Whether you are fixing a bug, improving documentation, or adding a new feature module, your contributions help the community build better API platforms on Azure.
To contribute, follow the standard GitHub workflow: fork the repository, create a feature branch, make your changes, and submit a pull request. Ensure all Bicep templates compile without errors using az bicep build before submitting.
-
Fork the repository
-
Create a feature branch (
git checkout -b feature/my-feature) -
Make your changes
-
Validate Bicep templates:
az bicep build --file infra/main.bicep
-
Commit your changes (
git commit -m "Add my feature") -
Push to the branch (
git push origin feature/my-feature) -
Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright (c) 2025 Evilazaro Alves.