Skip to content

Bicep Modules

infra/bicep/smb-ready-foundation/
├── main.bicep # Orchestration (subscription scope)
├── main.bicepparam # Parameter file with defaults
├── azure.yaml # azd project manifest
├── deploy-mg.bicep # Management group deployment (Phase 1)
├── hooks/
│ ├── pre-provision.ps1 # MG policies, cleanup, validation
│ └── post-provision.ps1 # Verification, retry, outputs
├── scripts/
│ └── Remove-SmbReadyFoundation.ps1
└── modules/
├── policy-assignments-mg.bicep # 30 MG-scoped policies
├── policy-assignments.bicep # 3 subscription-scoped policies
├── policy-backup-auto.bicep # VM backup auto-enrollment (DINE)
├── resource-groups.bicep # 6 resource groups
├── networking-hub.bicep # Hub VNet, Bastion, NSG, DNS
├── networking-spoke.bicep # Spoke VNet, NAT Gateway, NSG
├── networking-peering.bicep # VNet peering orchestration
├── networking-peering-spoke.bicep
├── route-tables.bicep # UDR for firewall routing
├── monitoring.bicep # Log Analytics Workspace
├── backup.bicep # Recovery Services Vault
├── migrate.bicep # Azure Migrate Project
├── budget.bicep # Cost Management Budget
├── firewall.bicep # Azure Firewall Basic
├── vpn-gateway.bicep # VPN Gateway VpnGw1AZ
├── keyvault.bicep # Key Vault + private endpoint
├── defender.bicep # Defender for Cloud
└── automation.bicep # Automation Account

All applicable modules use Azure Verified Modules (AVM) for reliability, security, and maintainability.

ModuleAVM ReferenceVersionUsed In
Virtual Networkavm/res/network/virtual-network0.8.0networking-hub, networking-spoke
Network Security Groupavm/res/network/network-security-group0.5.3networking-hub, networking-spoke
NAT Gatewayavm/res/network/nat-gateway2.1.0networking-spoke
Public IP Addressavm/res/network/public-ip-address0.12.0firewall
Azure Firewallavm/res/network/azure-firewall0.10.1firewall
Firewall Policyavm/res/network/firewall-policy0.3.4firewall
Route Tableavm/res/network/route-table0.5.0route-tables
VPN Gatewayavm/res/network/virtual-network-gateway0.10.1vpn-gateway
Private DNS Zoneavm/res/network/private-dns-zone0.8.1networking-hub, keyvault
Key Vaultavm/res/key-vault/vault0.13.3keyvault
Log Analyticsavm/res/operational-insights/workspace0.15.0monitoring
Automation Accountavm/res/automation/automation-account0.19.0automation
Recovery Services Vaultavm/res/recovery-services/vault0.11.1backup
ResourceARM TypeRationale
Azure Migrate ProjectMicrosoft.Migrate/migrateProjectsNo AVM module exists
Policy AssignmentsMicrosoft.Authorization/policyAssignmentsRaw ARM simplest for subscription scope
VNet PeeringvirtualNetworks/virtualNetworkPeeringsInline in VNet module
Backup Policyvaults/backupPoliciesNested in vault module
Phase 0: Setup-ManagementGroupPermissions.ps1 (one-time, Global Admin)
Phase 1: pre-provision hook → deploy-mg.bicep (MG + 30 policies)
Phase 2: azd provision → main.bicep (subscription infra + 3+1 policies)
CheckStatusNotes
bicep build✅ PassTemplate compiles successfully
bicep lint⚠️ PassMinor BCP318 warnings on conditional module outputs
bicep format✅ PassAll files formatted