Customization
Changing the Region
Section titled “Changing the Region”Two regions are supported:
# Sweden Central (default, EU GDPR)azd env set AZURE_LOCATION swedencentral
# Germany West Central (failover)azd env set AZURE_LOCATION germanywestcentralTo add a new region, update the location parameter’s @allowed list in main.bicep and add a region abbreviation mapping in the regionShort variable.
Adjusting Network Address Spaces
Section titled “Adjusting Network Address Spaces”azd env set HUB_VNET_ADDRESS_SPACE "10.10.0.0/23"azd env set SPOKE_VNET_ADDRESS_SPACE "10.10.2.0/23"The pre-provision hook validates CIDRs for:
- Valid CIDR format
- No overlap between hub and spoke
- No overlap with on-premises (if set)
Adding Bicep Modules
Section titled “Adding Bicep Modules”- Create your module in
modules/your-module.bicep - Add the module call in
main.bicepwith the appropriate scope:module yourModule 'modules/your-module.bicep' = {name: 'your-module-${uniqueSuffix}'scope: resourceGroup(rgNames.hub) // or appropriate RGparams: {location: locationtags: sharedServicesTags}} - Run
bicep build main.bicepto validate - Run
bicep lint main.bicepto check style
Adding Policy Assignments
Section titled “Adding Policy Assignments”MG-scoped policies are defined in modules/policy-assignments-mg.bicep. To add a new policy:
- Find the policy definition ID from the Azure Policy built-in definitions
- Add to the
policyDefinitionsvariable:yourPolicy: '/providers/Microsoft.Authorization/policyDefinitions/<guid>' - Add the resource:
resource policyYour01 'Microsoft.Authorization/policyAssignments@2024-04-01' = {name: 'smb-your-01'location: locationproperties: {displayName: 'SMB RF: Your Policy Name'description: 'Your policy description'policyDefinitionId: policyDefinitions.yourPolicyenforcementMode: 'Default'}}
Changing Resource Names
Section titled “Changing Resource Names”Resource names follow the Azure Cloud Adoption Framework (CAF) convention. The naming pattern is defined in variables within each module.
Key naming components:
regionShort: Derived from location (swedencentral→swc)environment: From parameter (prod,dev,staging)uniqueSuffix: FromuniqueString(subscription().subscriptionId)— deterministic per subscription
Forking for Multiple Customers
Section titled “Forking for Multiple Customers”Each customer deployment should use a separate azd environment:
# Customer Aazd env new customer-a-prodazd env set SCENARIO firewallazd env set OWNER "admin@customer-a.com"# ... set other paramsazd up
# Customer B (different subscription)az account set --subscription "customer-b-sub"azd env new customer-b-prodazd env set SCENARIO baselineazd env set OWNER "admin@customer-b.com"azd upFor significant customization, fork the repository and maintain customer-specific branches.