Subsections of Published modules
Azure Kubernettes Landing Zone
br/innofactor:avm/ptn/lz/aks:0.2.0
README
AKS Landing Zone [Lz/Aks]
Azure Kubernetes Service (AKS) Module
This module deploys an Azure Kubernetes Service (AKS) cluster with a system agent pool and an optional user agent pool. It also provisions related resources like Azure Container Registry (ACR) and Azure Key Vault for a complete AKS environment.
Navigation
Features
Default Configuration
- AKS Cluster: Standard SKU with managed AAD integration.
- System Node Pool: Standard preset size with 3 nodes across availability zones.
- Network: Azure CNI network plugin with Azure network policy.
- Security: RBAC enabled, local accounts disabled by default.
- Add-ons: Azure Policy, OMS agent, and Azure KeyVault Secrets Provider enabled.
Customization
Users can customize various aspects including:
- Node pool configurations (size, count, auto-scaling, etc.)
- Networking settings (CIDR ranges, network plugin/policy)
- AAD integration and RBAC settings
- Addon enablement (HTTP application routing, ingress, etc.)
- ACR SKU and access policies
- Key Vault configuration and access policies
Usage
This module is designed for use with Azure Developer CLI (azd) workflows but can be adapted for standalone use. Refer to the parameter descriptions and examples for detailed configuration options.
Note: This module is tailored for the AZD CLI product and may not be suitable for generic use cases without modification.
Resource Types
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/lz/aks:<version>.
Example 1: AKS Landing Zone with default parameters
This module deploys an Azure Kubernetes Service (AKS) landing zone with default settings.
Default Configuration Analysis for AKS Landing Zone
Core Settings:
Target Scope : Subscription
Location : northeurope
Telemetry : Enabled by default
Resources Deployed
This module provisions the following resources:
via Bicep module
module aks 'br/innofactor:avm/ptn/lz/aks:<version>' = {
name: 'aksDeployment'
params: {
// Required parameters
containerRegistryName: '<containerRegistryName>'
keyVaultName: '<keyVaultName>'
monitoringWorkspaceResourceId: '<monitoringWorkspaceResourceId>'
name: '<name>'
principalId: '<principalId>'
// Non-required parameters
aadProfile: {
aadProfileEnableAzureRBAC: true
aadProfileManaged: true
}
location: '<location>'
principalType: 'ServicePrincipal'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"containerRegistryName": {
"value": "<containerRegistryName>"
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"monitoringWorkspaceResourceId": {
"value": "<monitoringWorkspaceResourceId>"
},
"name": {
"value": "<name>"
},
"principalId": {
"value": "<principalId>"
},
// Non-required parameters
"aadProfile": {
"value": {
"aadProfileEnableAzureRBAC": true,
"aadProfileManaged": true
}
},
"location": {
"value": "<location>"
},
"principalType": {
"value": "ServicePrincipal"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/aks:<version>'
// Required parameters
param containerRegistryName = '<containerRegistryName>'
param keyVaultName = '<keyVaultName>'
param monitoringWorkspaceResourceId = '<monitoringWorkspaceResourceId>'
param name = '<name>'
param principalId = '<principalId>'
// Non-required parameters
param aadProfile = {
aadProfileEnableAzureRBAC: true
aadProfileManaged: true
}
param location = '<location>'
param principalType = 'ServicePrincipal'
Example 2: AKS Landing Zone sing large parameter set
This module deploys an Azure Kubernetes Service (AKS) landing zone with a large parameter set.
Core Settings:
Target Scope : Subscription
Location : northeurope
Telemetry : Enabled by default
Resources Deployed
This module provisions the following resources:
via Bicep module
module aks 'br/innofactor:avm/ptn/lz/aks:<version>' = {
name: 'aksDeployment'
params: {
// Required parameters
containerRegistryName: '<containerRegistryName>'
keyVaultName: '<keyVaultName>'
monitoringWorkspaceResourceId: '<monitoringWorkspaceResourceId>'
name: '<name>'
principalId: '<principalId>'
// Non-required parameters
aadProfile: '<aadProfile>'
acrSku: 'Basic'
agentPoolConfig: [
{
maxPods: 30
maxSurge: '33%'
mode: 'User'
name: 'npuserpool'
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
}
]
agentPoolSize: 'Standard'
aksClusterRoleAssignmentName: '<aksClusterRoleAssignmentName>'
containerRegistryRoleName: '<containerRegistryRoleName>'
disableLocalAccounts: false
dnsPrefix: 'dep-dns-paamax'
location: '<location>'
principalType: 'ServicePrincipal'
skuTier: 'Free'
systemPoolConfig: [
{
availabilityZones: [
1
2
3
]
count: 3
enableAutoScaling: true
maxCount: 5
minCount: 3
mode: 'System'
name: 'npsystem'
vmSize: 'Standard_DS2_v2'
}
]
webApplicationRoutingEnabled: true
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"containerRegistryName": {
"value": "<containerRegistryName>"
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"monitoringWorkspaceResourceId": {
"value": "<monitoringWorkspaceResourceId>"
},
"name": {
"value": "<name>"
},
"principalId": {
"value": "<principalId>"
},
// Non-required parameters
"aadProfile": {
"value": "<aadProfile>"
},
"acrSku": {
"value": "Basic"
},
"agentPoolConfig": {
"value": [
{
"maxPods": 30,
"maxSurge": "33%",
"mode": "User",
"name": "npuserpool",
"osType": "Linux",
"type": "VirtualMachineScaleSets",
"vmSize": "Standard_DS2_v2"
}
]
},
"agentPoolSize": {
"value": "Standard"
},
"aksClusterRoleAssignmentName": {
"value": "<aksClusterRoleAssignmentName>"
},
"containerRegistryRoleName": {
"value": "<containerRegistryRoleName>"
},
"disableLocalAccounts": {
"value": false
},
"dnsPrefix": {
"value": "dep-dns-paamax"
},
"location": {
"value": "<location>"
},
"principalType": {
"value": "ServicePrincipal"
},
"skuTier": {
"value": "Free"
},
"systemPoolConfig": {
"value": [
{
"availabilityZones": [
1,
2,
3
],
"count": 3,
"enableAutoScaling": true,
"maxCount": 5,
"minCount": 3,
"mode": "System",
"name": "npsystem",
"vmSize": "Standard_DS2_v2"
}
]
},
"webApplicationRoutingEnabled": {
"value": true
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/aks:<version>'
// Required parameters
param containerRegistryName = '<containerRegistryName>'
param keyVaultName = '<keyVaultName>'
param monitoringWorkspaceResourceId = '<monitoringWorkspaceResourceId>'
param name = '<name>'
param principalId = '<principalId>'
// Non-required parameters
param aadProfile = '<aadProfile>'
param acrSku = 'Basic'
param agentPoolConfig = [
{
maxPods: 30
maxSurge: '33%'
mode: 'User'
name: 'npuserpool'
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
}
]
param agentPoolSize = 'Standard'
param aksClusterRoleAssignmentName = '<aksClusterRoleAssignmentName>'
param containerRegistryRoleName = '<containerRegistryRoleName>'
param disableLocalAccounts = false
param dnsPrefix = 'dep-dns-paamax'
param location = '<location>'
param principalType = 'ServicePrincipal'
param skuTier = 'Free'
param systemPoolConfig = [
{
availabilityZones: [
1
2
3
]
count: 3
enableAutoScaling: true
maxCount: 5
minCount: 3
mode: 'System'
name: 'npsystem'
vmSize: 'Standard_DS2_v2'
}
]
param webApplicationRoutingEnabled = true
Example 3: WAF aligned AKS Landing Zone
This module deploys an WAF aligned Azure Kubernetes Service (AKS) landing zone.
Core Settings:
Target Scope : Subscription
Location : northeurope
Telemetry : Enabled by default
Resources Deployed
This module provisions the following resources:
Resource Dependencies
The following diagram illustrates the dependencies between the resources deployed by this module:
graph TD;
subgraph Subscription
RG["Resource Group"]
ACR["Azure Container Registry"]
Lock["Resource Lock (Optional)"]
Identity["Managed Identity (Optional)"]
end
subgraph Security
RBAC["Role Assignments (RBAC)"]
PrivateEndpoint["Private Endpoint (Optional)"]
KeyVault["Key Vault (CMK) (Optional)"]
end
subgraph Policies
RetentionPolicy["Retention Policy"]
TrustPolicy["Trust Policy (Optional)"]
SoftDelete["Soft Delete Policy (Optional)"]
Quarantine["Quarantine Policy (Optional)"]
end
subgraph Networking
PublicAccess["Public Network Access (Configurable)"]
NetworkRules["Network Rules (Optional)"]
end
subgraph Monitoring
Diagnostics["Diagnostic Settings (Optional)"]
Telemetry["Telemetry (Optional)"]
end
subgraph Replication
GeoReplication["Geo-Replication (Optional)"]
end
RG -->|Contains| ACR
ACR -->|Can be locked by| Lock
ACR -->|Uses| Identity
ACR -->|Has| RBAC
ACR -->|Can use| PrivateEndpoint
PrivateEndpoint -->|Can be secured with| NetworkRules
ACR -->|Can use| KeyVault
KeyVault -->|Manages encryption| ACR
ACR -->|Applies| RetentionPolicy
ACR -->|Applies| TrustPolicy
ACR -->|Uses| SoftDelete
ACR -->|Uses| Quarantine
ACR -->|Has| PublicAccess
ACR -->|Can apply| NetworkRules
ACR -->|Uses| Diagnostics
ACR -->|Can collect| Telemetry
ACR -->|Can replicate| GeoReplicationvia Bicep module
module aks 'br/innofactor:avm/ptn/lz/aks:<version>' = {
name: 'aksDeployment'
params: {
// Required parameters
containerRegistryName: '<containerRegistryName>'
keyVaultName: '<keyVaultName>'
monitoringWorkspaceResourceId: '<monitoringWorkspaceResourceId>'
name: '<name>'
principalId: '<principalId>'
// Non-required parameters
aadProfile: {
aadProfileEnableAzureRBAC: true
aadProfileManaged: true
}
acrPublicNetworkAccess: 'Disabled'
acrReplications: [
{
location: 'westeurope'
name: 'westeurope'
}
]
acrSku: 'Premium'
agentPoolConfig: [
{
count: 3
enableAutoScaling: true
maxCount: 5
maxPods: 30
maxSurge: '33%'
minCount: 3
mode: 'User'
name: 'npuserpool'
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
}
]
agentPoolSize: 'Standard'
aksClusterRoleAssignmentName: '<aksClusterRoleAssignmentName>'
containerRegistryRoleName: '<containerRegistryRoleName>'
disableLocalAccounts: false
dnsPrefix: 'dep-dns-paawaf'
location: '<location>'
principalType: 'ServicePrincipal'
skuTier: 'Standard'
systemPoolConfig: [
{
availabilityZones: [
1
2
3
]
count: 3
enableAutoScaling: true
maxCount: 5
minCount: 3
mode: 'System'
name: 'npsystem'
vmSize: 'Standard_DS2_v2'
}
]
webApplicationRoutingEnabled: true
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"containerRegistryName": {
"value": "<containerRegistryName>"
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"monitoringWorkspaceResourceId": {
"value": "<monitoringWorkspaceResourceId>"
},
"name": {
"value": "<name>"
},
"principalId": {
"value": "<principalId>"
},
// Non-required parameters
"aadProfile": {
"value": {
"aadProfileEnableAzureRBAC": true,
"aadProfileManaged": true
}
},
"acrPublicNetworkAccess": {
"value": "Disabled"
},
"acrReplications": {
"value": [
{
"location": "westeurope",
"name": "westeurope"
}
]
},
"acrSku": {
"value": "Premium"
},
"agentPoolConfig": {
"value": [
{
"count": 3,
"enableAutoScaling": true,
"maxCount": 5,
"maxPods": 30,
"maxSurge": "33%",
"minCount": 3,
"mode": "User",
"name": "npuserpool",
"osType": "Linux",
"type": "VirtualMachineScaleSets",
"vmSize": "Standard_DS2_v2"
}
]
},
"agentPoolSize": {
"value": "Standard"
},
"aksClusterRoleAssignmentName": {
"value": "<aksClusterRoleAssignmentName>"
},
"containerRegistryRoleName": {
"value": "<containerRegistryRoleName>"
},
"disableLocalAccounts": {
"value": false
},
"dnsPrefix": {
"value": "dep-dns-paawaf"
},
"location": {
"value": "<location>"
},
"principalType": {
"value": "ServicePrincipal"
},
"skuTier": {
"value": "Standard"
},
"systemPoolConfig": {
"value": [
{
"availabilityZones": [
1,
2,
3
],
"count": 3,
"enableAutoScaling": true,
"maxCount": 5,
"minCount": 3,
"mode": "System",
"name": "npsystem",
"vmSize": "Standard_DS2_v2"
}
]
},
"webApplicationRoutingEnabled": {
"value": true
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/aks:<version>'
// Required parameters
param containerRegistryName = '<containerRegistryName>'
param keyVaultName = '<keyVaultName>'
param monitoringWorkspaceResourceId = '<monitoringWorkspaceResourceId>'
param name = '<name>'
param principalId = '<principalId>'
// Non-required parameters
param aadProfile = {
aadProfileEnableAzureRBAC: true
aadProfileManaged: true
}
param acrPublicNetworkAccess = 'Disabled'
param acrReplications = [
{
location: 'westeurope'
name: 'westeurope'
}
]
param acrSku = 'Premium'
param agentPoolConfig = [
{
count: 3
enableAutoScaling: true
maxCount: 5
maxPods: 30
maxSurge: '33%'
minCount: 3
mode: 'User'
name: 'npuserpool'
osType: 'Linux'
type: 'VirtualMachineScaleSets'
vmSize: 'Standard_DS2_v2'
}
]
param agentPoolSize = 'Standard'
param aksClusterRoleAssignmentName = '<aksClusterRoleAssignmentName>'
param containerRegistryRoleName = '<containerRegistryRoleName>'
param disableLocalAccounts = false
param dnsPrefix = 'dep-dns-paawaf'
param location = '<location>'
param principalType = 'ServicePrincipal'
param skuTier = 'Standard'
param systemPoolConfig = [
{
availabilityZones: [
1
2
3
]
count: 3
enableAutoScaling: true
maxCount: 5
minCount: 3
mode: 'System'
name: 'npsystem'
vmSize: 'Standard_DS2_v2'
}
]
param webApplicationRoutingEnabled = true
Parameters
Required parameters
| Parameter | Type | Description |
|---|
containerRegistryName | string | Name of your Azure Container Registry. |
keyVaultName | string | Name of the Key Vault. Must be globally unique. |
monitoringWorkspaceResourceId | string | Resource ID of the monitoring log analytics workspace. |
name | string | The name of the parent managed cluster. Required if the template is used in a standalone deployment. |
principalId | string | Id of the user or app to assign application roles. |
Conditional parameters
| Parameter | Type | Description |
|---|
appGatewayResourceId | string | Specifies the resource ID of connected application gateway. Required if ingressApplicationGatewayEnabled is set to true. |
Optional parameters
| Parameter | Type | Description |
|---|
aadProfile | object | Enable Azure Active Directory integration. |
acrPublicNetworkAccess | string | Whether public network access is allowed for the container registry only. Defaults to the value of publicNetworkAccess. Disabling it requires the acrSku to be Premium. |
acrReplications | array | Geo-replications of the container registry. Requires the acrSku to be Premium. Each entry needs a name and a location that differs from the registry location. |
acrSku | string | Tier of your Azure container registry. |
agentPoolConfig | array | Custom configuration of user node pool. |
agentPoolSize | string | The User Pool Preset sizing. |
aksClusterRoleAssignmentName | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. |
autoNodeOsUpgradeProfileUpgradeChannel | string | Auto-upgrade channel on the Node Os. |
containerRegistryRoleName | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. |
disableLocalAccounts | bool | If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. |
dnsPrefix | string | Specifies the DNS prefix specified when creating the managed cluster. |
dnsServiceIP | string | Specifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. |
enableAzureRbac | bool | Enable RBAC using AAD. |
enableKeyvaultSecretsProvider | bool | Specifies whether the KeyvaultSecretsProvider add-on is enabled or not. |
enablePurgeProtection | bool | Provide ’true’ to enable Key Vault’s purge protection feature. |
enableRbacAuthorization | bool | Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. Note that management actions are always authorized with RBAC. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
enableVaultForDeployment | bool | Specifies if the vault is enabled for deployment by script or compute. |
enableVaultForTemplateDeployment | bool | Specifies if the vault is enabled for a template deployment. |
kubernetesVersion | string | Kubernetes Version. |
loadBalancerSku | string | Specifies the sku of the load balancer used by the virtual machine scale sets used by nodepools. |
location | string | Specifies the location of AKS cluster. It picks up Resource Group’s location by default. |
managedIdentityResourceId | string | The resource ID of an existing User Assigned Identity to use for the AKS Control Plane, requires RBAC assignments to be done outside of this template. |
networkDataplane | string | Network dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin. |
networkPlugin | string | Network plugin used for building the Kubernetes network. |
networkPluginMode | string | Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin. |
networkPolicy | string | Specifies the network policy used for building Kubernetes network. - calico or azure. |
nodeResourceGroupName | string | The name of the resource group for the managed resources of the AKS cluster. |
podCidr | string | Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used. |
principalType | string | The type of principal to assign application roles. |
publicNetworkAccess | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the ‘acrSku’ to be ‘Premium’. |
scopeMaps | array | Scope maps setting. |
serviceCidr | string | A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. |
skuTier | string | Tier of a managed cluster SKU. |
sshPublicKey | string | Specifies the SSH RSA public key string for the Linux nodes. |
systemPoolConfig | array | Custom configuration of system node pool. |
systemPoolSize | string | The System Pool Preset sizing. |
tags | object | Custom tags to apply to the AKS resources. |
webApplicationRoutingEnabled | bool | Specifies whether the webApplicationRoutingEnabled add-on is enabled or not. |
Parameter: containerRegistryName
Name of your Azure Container Registry.
- Required: Yes
- Type: string
Parameter: keyVaultName
Name of the Key Vault. Must be globally unique.
- Required: Yes
- Type: string
Parameter: monitoringWorkspaceResourceId
Resource ID of the monitoring log analytics workspace.
- Required: Yes
- Type: string
Parameter: name
The name of the parent managed cluster. Required if the template is used in a standalone deployment.
- Required: Yes
- Type: string
Parameter: principalId
Id of the user or app to assign application roles.
- Required: Yes
- Type: string
Parameter: appGatewayResourceId
Specifies the resource ID of connected application gateway. Required if ingressApplicationGatewayEnabled is set to true.
Parameter: aadProfile
Enable Azure Active Directory integration.
Required parameters
Optional parameters
Parameter: aadProfile.aadProfileEnableAzureRBAC
Specifies whether to enable Azure RBAC for Kubernetes authorization.
Parameter: aadProfile.aadProfileManaged
Specifies whether to enable managed AAD integration.
Parameter: aadProfile.aadProfileAdminGroupObjectIDs
Specifies the AAD group object IDs that will have admin role of the cluster.
Parameter: aadProfile.aadProfileClientAppID
The client AAD application ID.
Parameter: aadProfile.aadProfileServerAppID
The server AAD application ID.
Parameter: aadProfile.aadProfileServerAppSecret
The server AAD application secret.
Parameter: aadProfile.aadProfileTenantId
Specifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication.
Parameter: acrPublicNetworkAccess
Whether public network access is allowed for the container registry only. Defaults to the value of publicNetworkAccess. Disabling it requires the acrSku to be Premium.
- Required: No
- Type: string
- Allowed:
Parameter: acrReplications
Geo-replications of the container registry. Requires the acrSku to be Premium. Each entry needs a name and a location that differs from the registry location.
Parameter: acrSku
Tier of your Azure container registry.
- Required: No
- Type: string
- Default:
'Standard' - Allowed:
[
'Basic'
'Premium'
'Standard'
]
Parameter: agentPoolConfig
Custom configuration of user node pool.
Required parameters
| Parameter | Type | Description |
|---|
name | string | The name of the agent pool. |
Optional parameters
| Parameter | Type | Description |
|---|
availabilityZones | array | The availability zones of the agent pool. |
count | int | The number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). |
enableAutoScaling | bool | Whether to enable auto-scaling for the agent pool. |
enableDefaultTelemetry | bool | The enable default telemetry of the agent pool. |
enableEncryptionAtHost | bool | Whether to enable encryption at host for the agent pool. |
enableFIPS | bool | Whether to enable FIPS for the agent pool. |
enableNodePublicIP | bool | Whether to enable node public IP for the agent pool. |
enableSecureBoot | bool | Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. |
enableUltraSSD | bool | Whether to enable Ultra SSD for the agent pool. |
enableVTPM | bool | vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. |
gpuInstanceProfile | string | The GPU instance profile of the agent pool. |
kubeletDiskType | string | The kubelet disk type of the agent pool. |
linuxOSConfig | object | The Linux OS configuration of the agent pool. |
maxCount | int | The maximum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). |
maxPods | int | The maximum number of pods that can run on a node. |
maxSurge | string | The maximum number of nodes that can be created during an upgrade. |
minCount | int | The minimum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). |
minPods | int | The minimum number of pods that can run on a node. |
mode | string | The mode of the agent pool. |
nodeLabels | object | The node labels of the agent pool. |
nodePublicIpPrefixResourceId | string | The node public IP prefix ID of the agent pool. |
nodeTaints | array | The node taints of the agent pool. |
orchestratorVersion | string | The Kubernetes version of the agent pool. |
osDiskSizeGB | int | The OS disk size in GB of the agent pool. |
osDiskType | string | The OS disk type of the agent pool. |
osSKU | string | The OS SKU of the agent pool. |
osType | string | The OS type of the agent pool. |
podSubnetResourceId | string | The pod subnet ID of the agent pool. |
proximityPlacementGroupResourceId | string | The proximity placement group resource ID of the agent pool. |
scaleDownMode | string | The scale down mode of the agent pool. |
scaleSetEvictionPolicy | string | The scale set eviction policy of the agent pool. |
scaleSetPriority | string | The scale set priority of the agent pool. |
sourceResourceId | string | The source resource ID to create the agent pool from. |
spotMaxPrice | int | The spot max price of the agent pool. |
sshAccess | string | SSH access method of an agent pool. |
tags | object | The tags of the agent pool. |
type | string | The type of the agent pool. |
vmSize | string | The VM size of the agent pool. |
vnetSubnetResourceId | string | The VNet subnet ID of the agent pool. |
windowsProfile | object | The Windows profile of the agent pool. |
workloadRuntime | string | The workload runtime of the agent pool. |
Parameter: agentPoolConfig.name
The name of the agent pool.
- Required: Yes
- Type: string
Parameter: agentPoolConfig.availabilityZones
The availability zones of the agent pool.
Parameter: agentPoolConfig.count
The number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
Parameter: agentPoolConfig.enableAutoScaling
Whether to enable auto-scaling for the agent pool.
Parameter: agentPoolConfig.enableDefaultTelemetry
The enable default telemetry of the agent pool.
Parameter: agentPoolConfig.enableEncryptionAtHost
Whether to enable encryption at host for the agent pool.
Parameter: agentPoolConfig.enableFIPS
Whether to enable FIPS for the agent pool.
Parameter: agentPoolConfig.enableNodePublicIP
Whether to enable node public IP for the agent pool.
Parameter: agentPoolConfig.enableSecureBoot
Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch.
Parameter: agentPoolConfig.enableUltraSSD
Whether to enable Ultra SSD for the agent pool.
Parameter: agentPoolConfig.enableVTPM
vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch.
Parameter: agentPoolConfig.gpuInstanceProfile
The GPU instance profile of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'MIG1g'
'MIG2g'
'MIG3g'
'MIG4g'
'MIG7g'
]
Parameter: agentPoolConfig.kubeletDiskType
The kubelet disk type of the agent pool.
Parameter: agentPoolConfig.linuxOSConfig
The Linux OS configuration of the agent pool.
Parameter: agentPoolConfig.maxCount
The maximum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
Parameter: agentPoolConfig.maxPods
The maximum number of pods that can run on a node.
Parameter: agentPoolConfig.maxSurge
The maximum number of nodes that can be created during an upgrade.
Parameter: agentPoolConfig.minCount
The minimum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
Parameter: agentPoolConfig.minPods
The minimum number of pods that can run on a node.
Parameter: agentPoolConfig.mode
The mode of the agent pool.
- Required: No
- Type: string
- Allowed:
Parameter: agentPoolConfig.nodeLabels
The node labels of the agent pool.
Parameter: agentPoolConfig.nodePublicIpPrefixResourceId
The node public IP prefix ID of the agent pool.
Parameter: agentPoolConfig.nodeTaints
The node taints of the agent pool.
Parameter: agentPoolConfig.orchestratorVersion
The Kubernetes version of the agent pool.
Parameter: agentPoolConfig.osDiskSizeGB
The OS disk size in GB of the agent pool.
Parameter: agentPoolConfig.osDiskType
The OS disk type of the agent pool.
Parameter: agentPoolConfig.osSKU
The OS SKU of the agent pool.
Parameter: agentPoolConfig.osType
The OS type of the agent pool.
- Required: No
- Type: string
- Allowed:
Parameter: agentPoolConfig.podSubnetResourceId
The pod subnet ID of the agent pool.
Parameter: agentPoolConfig.proximityPlacementGroupResourceId
The proximity placement group resource ID of the agent pool.
Parameter: agentPoolConfig.scaleDownMode
The scale down mode of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'Deallocate'
'Delete'
]
Parameter: agentPoolConfig.scaleSetEvictionPolicy
The scale set eviction policy of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'Deallocate'
'Delete'
]
Parameter: agentPoolConfig.scaleSetPriority
The scale set priority of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'Low'
'Regular'
'Spot'
]
Parameter: agentPoolConfig.sourceResourceId
The source resource ID to create the agent pool from.
Parameter: agentPoolConfig.spotMaxPrice
The spot max price of the agent pool.
Parameter: agentPoolConfig.sshAccess
SSH access method of an agent pool.
- Required: No
- Type: string
- Allowed:
[
'Disabled'
'LocalUser'
]
The tags of the agent pool.
Parameter: agentPoolConfig.type
The type of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'AvailabilitySet'
'VirtualMachineScaleSets'
]
Parameter: agentPoolConfig.vmSize
The VM size of the agent pool.
Parameter: agentPoolConfig.vnetSubnetResourceId
The VNet subnet ID of the agent pool.
Parameter: agentPoolConfig.windowsProfile
The Windows profile of the agent pool.
Parameter: agentPoolConfig.workloadRuntime
The workload runtime of the agent pool.
Parameter: agentPoolSize
The User Pool Preset sizing.
- Required: No
- Type: string
- Default:
'' - Allowed:
[
''
'CostOptimised'
'Custom'
'HighSpec'
'Standard'
]
Parameter: aksClusterRoleAssignmentName
The name (as GUID) of the role assignment. If not provided, a GUID will be generated.
Parameter: autoNodeOsUpgradeProfileUpgradeChannel
Auto-upgrade channel on the Node Os.
- Required: No
- Type: string
- Default:
'NodeImage' - Allowed:
[
'NodeImage'
'None'
'SecurityPatch'
'Unmanaged'
]
Parameter: containerRegistryRoleName
The name (as GUID) of the role assignment. If not provided, a GUID will be generated.
Parameter: disableLocalAccounts
If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled.
- Required: No
- Type: bool
- Default:
True
Parameter: dnsPrefix
Specifies the DNS prefix specified when creating the managed cluster.
- Required: No
- Type: string
- Default:
[parameters('name')]
Parameter: dnsServiceIP
Specifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
Parameter: enableAzureRbac
Enable RBAC using AAD.
- Required: No
- Type: bool
- Default:
False
Parameter: enableKeyvaultSecretsProvider
Specifies whether the KeyvaultSecretsProvider add-on is enabled or not.
- Required: No
- Type: bool
- Default:
True
Parameter: enablePurgeProtection
Provide ’true’ to enable Key Vault’s purge protection feature.
- Required: No
- Type: bool
- Default:
False
Parameter: enableRbacAuthorization
Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. Note that management actions are always authorized with RBAC.
- Required: No
- Type: bool
- Default:
False
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: enableVaultForDeployment
Specifies if the vault is enabled for deployment by script or compute.
- Required: No
- Type: bool
- Default:
False
Parameter: enableVaultForTemplateDeployment
Specifies if the vault is enabled for a template deployment.
- Required: No
- Type: bool
- Default:
False
Parameter: kubernetesVersion
Kubernetes Version.
- Required: No
- Type: string
- Default:
'1.34'
Parameter: loadBalancerSku
Specifies the sku of the load balancer used by the virtual machine scale sets used by nodepools.
- Required: No
- Type: string
- Default:
'standard' - Allowed:
Parameter: location
Specifies the location of AKS cluster. It picks up Resource Group’s location by default.
- Required: No
- Type: string
- Default:
[resourceGroup().location]
Parameter: managedIdentityResourceId
The resource ID of an existing User Assigned Identity to use for the AKS Control Plane, requires RBAC assignments to be done outside of this template.
- Required: No
- Type: string
- Default:
''
Parameter: networkDataplane
Network dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin.
- Required: No
- Type: string
- Allowed:
Parameter: networkPlugin
Network plugin used for building the Kubernetes network.
- Required: No
- Type: string
- Default:
'azure' - Allowed:
Parameter: networkPluginMode
Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin.
- Required: No
- Type: string
- Allowed:
Parameter: networkPolicy
Specifies the network policy used for building Kubernetes network. - calico or azure.
- Required: No
- Type: string
- Default:
'azure' - Allowed:
Parameter: nodeResourceGroupName
The name of the resource group for the managed resources of the AKS cluster.
- Required: No
- Type: string
- Default:
[format('rg-mc-{0}', parameters('name'))]
Parameter: podCidr
Specifies the CIDR notation IP range from which to assign pod IPs when kubenet is used.
Parameter: principalType
The type of principal to assign application roles.
- Required: No
- Type: string
- Default:
'User' - Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
Parameter: publicNetworkAccess
Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the ‘acrSku’ to be ‘Premium’.
- Required: No
- Type: string
- Default:
'Enabled' - Allowed:
Parameter: scopeMaps
Scope maps setting.
Required parameters
| Parameter | Type | Description |
|---|
actions | array | The list of scoped permissions for registry artifacts. |
Optional parameters
| Parameter | Type | Description |
|---|
description | string | The user friendly description of the scope map. |
name | string | The name of the scope map. |
Parameter: scopeMaps.actions
The list of scoped permissions for registry artifacts.
Parameter: scopeMaps.description
The user friendly description of the scope map.
Parameter: scopeMaps.name
The name of the scope map.
Parameter: serviceCidr
A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
Parameter: skuTier
Tier of a managed cluster SKU.
- Required: No
- Type: string
- Default:
'Standard' - Allowed:
[
'Free'
'Premium'
'Standard'
]
Parameter: sshPublicKey
Specifies the SSH RSA public key string for the Linux nodes.
Parameter: systemPoolConfig
Custom configuration of system node pool.
Required parameters
| Parameter | Type | Description |
|---|
name | string | The name of the agent pool. |
Optional parameters
| Parameter | Type | Description |
|---|
availabilityZones | array | The availability zones of the agent pool. |
count | int | The number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). |
enableAutoScaling | bool | Whether to enable auto-scaling for the agent pool. |
enableDefaultTelemetry | bool | The enable default telemetry of the agent pool. |
enableEncryptionAtHost | bool | Whether to enable encryption at host for the agent pool. |
enableFIPS | bool | Whether to enable FIPS for the agent pool. |
enableNodePublicIP | bool | Whether to enable node public IP for the agent pool. |
enableSecureBoot | bool | Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. |
enableUltraSSD | bool | Whether to enable Ultra SSD for the agent pool. |
enableVTPM | bool | vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. |
gpuInstanceProfile | string | The GPU instance profile of the agent pool. |
kubeletDiskType | string | The kubelet disk type of the agent pool. |
linuxOSConfig | object | The Linux OS configuration of the agent pool. |
maxCount | int | The maximum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). |
maxPods | int | The maximum number of pods that can run on a node. |
maxSurge | string | The maximum number of nodes that can be created during an upgrade. |
minCount | int | The minimum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). |
minPods | int | The minimum number of pods that can run on a node. |
mode | string | The mode of the agent pool. |
nodeLabels | object | The node labels of the agent pool. |
nodePublicIpPrefixResourceId | string | The node public IP prefix ID of the agent pool. |
nodeTaints | array | The node taints of the agent pool. |
orchestratorVersion | string | The Kubernetes version of the agent pool. |
osDiskSizeGB | int | The OS disk size in GB of the agent pool. |
osDiskType | string | The OS disk type of the agent pool. |
osSKU | string | The OS SKU of the agent pool. |
osType | string | The OS type of the agent pool. |
podSubnetResourceId | string | The pod subnet ID of the agent pool. |
proximityPlacementGroupResourceId | string | The proximity placement group resource ID of the agent pool. |
scaleDownMode | string | The scale down mode of the agent pool. |
scaleSetEvictionPolicy | string | The scale set eviction policy of the agent pool. |
scaleSetPriority | string | The scale set priority of the agent pool. |
sourceResourceId | string | The source resource ID to create the agent pool from. |
spotMaxPrice | int | The spot max price of the agent pool. |
sshAccess | string | SSH access method of an agent pool. |
tags | object | The tags of the agent pool. |
type | string | The type of the agent pool. |
vmSize | string | The VM size of the agent pool. |
vnetSubnetResourceId | string | The VNet subnet ID of the agent pool. |
windowsProfile | object | The Windows profile of the agent pool. |
workloadRuntime | string | The workload runtime of the agent pool. |
Parameter: systemPoolConfig.name
The name of the agent pool.
- Required: Yes
- Type: string
Parameter: systemPoolConfig.availabilityZones
The availability zones of the agent pool.
Parameter: systemPoolConfig.count
The number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
Parameter: systemPoolConfig.enableAutoScaling
Whether to enable auto-scaling for the agent pool.
Parameter: systemPoolConfig.enableDefaultTelemetry
The enable default telemetry of the agent pool.
Parameter: systemPoolConfig.enableEncryptionAtHost
Whether to enable encryption at host for the agent pool.
Parameter: systemPoolConfig.enableFIPS
Whether to enable FIPS for the agent pool.
Parameter: systemPoolConfig.enableNodePublicIP
Whether to enable node public IP for the agent pool.
Parameter: systemPoolConfig.enableSecureBoot
Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch.
Parameter: systemPoolConfig.enableUltraSSD
Whether to enable Ultra SSD for the agent pool.
Parameter: systemPoolConfig.enableVTPM
vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch.
Parameter: systemPoolConfig.gpuInstanceProfile
The GPU instance profile of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'MIG1g'
'MIG2g'
'MIG3g'
'MIG4g'
'MIG7g'
]
Parameter: systemPoolConfig.kubeletDiskType
The kubelet disk type of the agent pool.
Parameter: systemPoolConfig.linuxOSConfig
The Linux OS configuration of the agent pool.
Parameter: systemPoolConfig.maxCount
The maximum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
Parameter: systemPoolConfig.maxPods
The maximum number of pods that can run on a node.
Parameter: systemPoolConfig.maxSurge
The maximum number of nodes that can be created during an upgrade.
Parameter: systemPoolConfig.minCount
The minimum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
Parameter: systemPoolConfig.minPods
The minimum number of pods that can run on a node.
Parameter: systemPoolConfig.mode
The mode of the agent pool.
- Required: No
- Type: string
- Allowed:
Parameter: systemPoolConfig.nodeLabels
The node labels of the agent pool.
Parameter: systemPoolConfig.nodePublicIpPrefixResourceId
The node public IP prefix ID of the agent pool.
Parameter: systemPoolConfig.nodeTaints
The node taints of the agent pool.
Parameter: systemPoolConfig.orchestratorVersion
The Kubernetes version of the agent pool.
Parameter: systemPoolConfig.osDiskSizeGB
The OS disk size in GB of the agent pool.
Parameter: systemPoolConfig.osDiskType
The OS disk type of the agent pool.
Parameter: systemPoolConfig.osSKU
The OS SKU of the agent pool.
Parameter: systemPoolConfig.osType
The OS type of the agent pool.
- Required: No
- Type: string
- Allowed:
Parameter: systemPoolConfig.podSubnetResourceId
The pod subnet ID of the agent pool.
Parameter: systemPoolConfig.proximityPlacementGroupResourceId
The proximity placement group resource ID of the agent pool.
Parameter: systemPoolConfig.scaleDownMode
The scale down mode of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'Deallocate'
'Delete'
]
Parameter: systemPoolConfig.scaleSetEvictionPolicy
The scale set eviction policy of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'Deallocate'
'Delete'
]
Parameter: systemPoolConfig.scaleSetPriority
The scale set priority of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'Low'
'Regular'
'Spot'
]
Parameter: systemPoolConfig.sourceResourceId
The source resource ID to create the agent pool from.
Parameter: systemPoolConfig.spotMaxPrice
The spot max price of the agent pool.
Parameter: systemPoolConfig.sshAccess
SSH access method of an agent pool.
- Required: No
- Type: string
- Allowed:
[
'Disabled'
'LocalUser'
]
The tags of the agent pool.
Parameter: systemPoolConfig.type
The type of the agent pool.
- Required: No
- Type: string
- Allowed:
[
'AvailabilitySet'
'VirtualMachineScaleSets'
]
Parameter: systemPoolConfig.vmSize
The VM size of the agent pool.
Parameter: systemPoolConfig.vnetSubnetResourceId
The VNet subnet ID of the agent pool.
Parameter: systemPoolConfig.windowsProfile
The Windows profile of the agent pool.
Parameter: systemPoolConfig.workloadRuntime
The workload runtime of the agent pool.
Parameter: systemPoolSize
The System Pool Preset sizing.
- Required: No
- Type: string
- Default:
'Standard' - Allowed:
[
'CostOptimised'
'Custom'
'HighSpec'
'Standard'
]
Custom tags to apply to the AKS resources.
- Required: No
- Type: object
- Default:
{}
Parameter: webApplicationRoutingEnabled
Specifies whether the webApplicationRoutingEnabled add-on is enabled or not.
- Required: No
- Type: bool
- Default:
True
Outputs
| Output | Type | Description |
|---|
containerRegistryLoginServer | string | The login server for the container registry. |
containerRegistryName | string | The resource name of the ACR. |
managedClusterClientId | string | The Client ID of the AKS identity. |
managedClusterName | string | The resource name of the AKS cluster. |
managedClusterObjectId | string | The Object ID of the AKS identity. |
managedClusterResourceId | string | The resource ID of the AKS cluster. |
managedIdentityClientId | string | The client ID of the managed identity used by the AKS cluster. |
managedIdentityPrincipalId | string | The principal ID of the managed identity used by the AKS cluster. |
managedIdentityResourceId | string | The resource ID of the managed identity used by the AKS cluster. |
resourceGroupName | string | The resource group the application insights components were deployed into. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/public:avm/res/container-registry/registry:0.5.1 | Remote reference |
br/public:avm/res/container-service/managed-cluster:0.11.1 | Remote reference |
br/public:avm/res/key-vault/vault:0.9.0 | Remote reference |
br/public:avm/res/managed-identity/user-assigned-identity:0.4.0 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.2.0
Changes
- Added the
acrReplications parameter for geo-replication of the container registry (default: none). It requires a Premium registry SKU. - Added the
acrPublicNetworkAccess parameter to control public access of the registry on its own. It defaults to publicNetworkAccess, so the cluster API server can stay reachable while the registry is private. - The waf-aligned test deploys a Premium registry with a geo-replica and public access disabled, which satisfies the PSRule WAF Reliability rules.
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
- None. The new parameters default to the previous behaviour.
0.1.3
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.2
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.0
Changes
- AKS MVP Scaffolding (#128)
Breaking Changes
Version history
| Version | Published |
|---|
0.2.0 | 2026-11-16 |
0.1.3 | 2025-04-01 |
0.1.2 | 2025-03-31 |
0.1.1 | 2025-03-16 |
0.1.0 | 2025-03-11 |
Atlantis Landing Zone
br/innofactor:avm/ptn/lz/atlantis:0.1.0
README
Atlantis Appliance (Landing Zone Pattern) [Lz/Atlantis]
A self-hosted Atlantis server for Terraform pull-request automation on Azure DevOps, delivered as an active/standby pair of VMs (or one VM) in its own spoke VNet behind Entra sign-in. Subscription-scope wrapper: it creates ONE resource group, then invokes the Atlantis workload layer (atlantis.bicep) inside it, which in turn consumes the payload-agnostic container-appliance pattern module.
container-appliance (avm/ptn/lz/container-appliance): VNet and subnet, NSG, NAT Gateway, VMs, data disk and failover lease, managed identity, Key Vault, backup, monitoring, alerting and patching.atlantis.bicep: the Atlantis-specific layer: Terraform-state storage, the compose stack for Atlantis and oauth2-proxy, Atlantis’s own configuration, the depth probe and its alerts.
All parameters pass straight through. See the Notes section for the prerequisites checklist, the seed templates and the operational constraints.
Navigation
Resource Types
| Resource Type | API Version |
|---|
Microsoft.Authorization/locks | 2020-05-01 |
Microsoft.Authorization/roleAssignments | 2022-04-01 |
Microsoft.Automanage/configurationProfileAssignments | 2022-05-04 |
Microsoft.Compute/disks | 2024-03-02 |
Microsoft.Compute/virtualMachines | 2024-07-01 |
Microsoft.Compute/virtualMachines/extensions | 2022-11-01 |
Microsoft.Compute/virtualMachineScaleSets | 2024-07-01 |
Microsoft.DevTestLab/schedules | 2018-09-15 |
Microsoft.GuestConfiguration/guestConfigurationAssignments | 2020-06-25 |
Microsoft.Insights/actionGroups | 2023-01-01 |
Microsoft.Insights/dataCollectionRuleAssociations | 2023-03-11 |
Microsoft.Insights/dataCollectionRuleAssociations | 2022-06-01 |
Microsoft.Insights/dataCollectionRules | 2023-03-11 |
Microsoft.Insights/diagnosticSettings | 2021-05-01-preview |
Microsoft.Insights/metricAlerts | 2018-03-01 |
Microsoft.Insights/scheduledQueryRules | 2023-12-01 |
Microsoft.Insights/scheduledQueryRules | 2025-01-01-preview |
Microsoft.Insights/workbooks | 2023-06-01 |
Microsoft.KeyVault/vaults | 2024-11-01 |
Microsoft.KeyVault/vaults/accessPolicies | 2024-11-01 |
Microsoft.KeyVault/vaults/keys | 2024-11-01 |
Microsoft.KeyVault/vaults/secrets | 2024-11-01 |
Microsoft.KeyVault/vaults/secrets | 2023-07-01 |
Microsoft.Maintenance/configurationAssignments | 2023-04-01 |
Microsoft.Maintenance/maintenanceConfigurations | 2023-04-01 |
Microsoft.ManagedIdentity/userAssignedIdentities | 2024-11-30 |
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials | 2024-11-30 |
Microsoft.Network/loadBalancers | 2024-05-01 |
Microsoft.Network/natGateways | 2023-04-01 |
Microsoft.Network/networkInterfaces | 2024-05-01 |
Microsoft.Network/networkSecurityGroups | 2023-11-01 |
Microsoft.Network/privateEndpoints | 2023-11-01 |
Microsoft.Network/privateEndpoints | 2024-10-01 |
Microsoft.Network/privateEndpoints | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2023-11-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-10-01 |
Microsoft.Network/publicIPAddresses | 2024-05-01 |
Microsoft.Network/publicIPAddresses | 2023-09-01 |
Microsoft.Network/publicIPPrefixes | 2023-09-01 |
Microsoft.Network/routeTables | 2024-05-01 |
Microsoft.Network/virtualNetworks | 2024-05-01 |
Microsoft.Network/virtualNetworks/subnets | 2024-05-01 |
Microsoft.Network/virtualNetworks/virtualNetworkPeerings | 2024-01-01 |
Microsoft.OperationalInsights/workspaces | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/dataExports | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/dataSources | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/linkedServices | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/linkedStorageAccounts | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/savedSearches | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/storageInsightConfigs | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/tables | 2025-02-01 |
Microsoft.OperationsManagement/solutions | 2015-11-01-preview |
Microsoft.RecoveryServices/vaults | 2024-04-01 |
Microsoft.RecoveryServices/vaults/backupconfig | 2023-01-01 |
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems | 2023-01-01 |
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems | 2024-10-01 |
Microsoft.RecoveryServices/vaults/backupPolicies | 2024-10-01 |
Microsoft.RecoveryServices/vaults/backupstorageconfig | 2023-01-01 |
Microsoft.RecoveryServices/vaults/replicationAlertSettings | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationPolicies | 2023-06-01 |
Microsoft.Resources/resourceGroups | 2021-04-01 |
Microsoft.SecurityInsights/onboardingStates | 2024-03-01 |
Microsoft.Storage/storageAccounts | 2025-06-01 |
Microsoft.Storage/storageAccounts | 2023-05-01 |
Microsoft.Storage/storageAccounts/blobServices | 2025-01-01 |
Microsoft.Storage/storageAccounts/blobServices | 2022-09-01 |
Microsoft.Storage/storageAccounts/blobServices/containers | 2022-09-01 |
Microsoft.Storage/storageAccounts/blobServices/containers | 2025-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies | 2022-09-01 |
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies | 2025-01-01 |
Microsoft.Storage/storageAccounts/fileServices | 2023-04-01 |
Microsoft.Storage/storageAccounts/fileServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/fileServices/shares | 2023-01-01 |
Microsoft.Storage/storageAccounts/fileServices/shares | 2025-01-01 |
Microsoft.Storage/storageAccounts/localUsers | 2025-06-01 |
Microsoft.Storage/storageAccounts/localUsers | 2023-04-01 |
Microsoft.Storage/storageAccounts/managementPolicies | 2025-06-01 |
Microsoft.Storage/storageAccounts/managementPolicies | 2023-01-01 |
Microsoft.Storage/storageAccounts/objectReplicationPolicies | 2025-01-01 |
Microsoft.Storage/storageAccounts/queueServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/queueServices | 2023-04-01 |
Microsoft.Storage/storageAccounts/queueServices/queues | 2025-06-01 |
Microsoft.Storage/storageAccounts/queueServices/queues | 2023-04-01 |
Microsoft.Storage/storageAccounts/tableServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/tableServices | 2023-04-01 |
Microsoft.Storage/storageAccounts/tableServices/tables | 2023-04-01 |
Microsoft.Storage/storageAccounts/tableServices/tables | 2025-06-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/lz/atlantis:<version>.
Example 1: Active/standby with a switchover
This instance deploys the Atlantis appliance as an active/standby pair and moves it. After the second deployment (the idempotency pass) a deployment script writes a marker to the data disk, lets the active host drain (it waits until Atlantis reports no operation in progress) and release the lease, detaches the disk and attaches it to the standby, and asserts that Atlantis answers on the load balancer again within five minutes with the marker intact. The duration is a deployment output.
via Bicep module
module atlantis 'br/innofactor:avm/ptn/lz/atlantis:<version>' = {
name: 'atlantisDeployment'
params: {
// Required parameters
adoUser: 'atlantis@example.com'
adoWebhookUser: 'atlantis-webhook'
atlantisExternalHostname: 'atllzasb.example.com'
azureDevOpsPat: '<azureDevOpsPat>'
azureDevOpsWebhookPassword: '<azureDevOpsWebhookPassword>'
entraTenantId: '<entraTenantId>'
inboundAllowedCidr: '10.0.0.0/8'
oauth2ClientId: '00000000-0000-0000-0000-000000000000'
oauth2ClientSecret: '<oauth2ClientSecret>'
oauth2ProxyAllowedEmailDomains: 'example.com'
oauth2ProxyCookieSecret: '<oauth2ProxyCookieSecret>'
repoAllowlist: 'dev.azure.com/example-org/*'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vnetAddressPrefix: '10.242.0.0/24'
// Non-required parameters
enableBackup: false
enableKeyVaultPurgeProtection: false
keyVaultName: '<keyVaultName>'
location: '<location>'
name: '<name>'
registryToken: '<registryToken>'
scaleMode: 'activeStandby'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"adoUser": {
"value": "atlantis@example.com"
},
"adoWebhookUser": {
"value": "atlantis-webhook"
},
"atlantisExternalHostname": {
"value": "atllzasb.example.com"
},
"azureDevOpsPat": {
"value": "<azureDevOpsPat>"
},
"azureDevOpsWebhookPassword": {
"value": "<azureDevOpsWebhookPassword>"
},
"entraTenantId": {
"value": "<entraTenantId>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"oauth2ClientId": {
"value": "00000000-0000-0000-0000-000000000000"
},
"oauth2ClientSecret": {
"value": "<oauth2ClientSecret>"
},
"oauth2ProxyAllowedEmailDomains": {
"value": "example.com"
},
"oauth2ProxyCookieSecret": {
"value": "<oauth2ProxyCookieSecret>"
},
"repoAllowlist": {
"value": "dev.azure.com/example-org/*"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
},
// Non-required parameters
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"name": {
"value": "<name>"
},
"registryToken": {
"value": "<registryToken>"
},
"scaleMode": {
"value": "activeStandby"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/atlantis:<version>'
// Required parameters
param adoUser = 'atlantis@example.com'
param adoWebhookUser = 'atlantis-webhook'
param atlantisExternalHostname = 'atllzasb.example.com'
param azureDevOpsPat = '<azureDevOpsPat>'
param azureDevOpsWebhookPassword = '<azureDevOpsWebhookPassword>'
param entraTenantId = '<entraTenantId>'
param inboundAllowedCidr = '10.0.0.0/8'
oauth2ClientId: '00000000-0000-0000-0000-000000000000'
oauth2ClientSecret: '<oauth2ClientSecret>'
oauth2ProxyAllowedEmailDomains: 'example.com'
oauth2ProxyCookieSecret: '<oauth2ProxyCookieSecret>'
param repoAllowlist = 'dev.azure.com/example-org/*'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vnetAddressPrefix = '10.242.0.0/24'
// Non-required parameters
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param name = '<name>'
param registryToken = '<registryToken>'
param scaleMode = 'activeStandby'
Example 2: Using only defaults
This instance deploys the Atlantis appliance with the minimum set of required parameters: an active/standby pair, images pulled from the private mirror with a Key Vault token, and no hub peering. The appliance creates its own managed identity, NAT Gateway and resource group.
via Bicep module
module atlantis 'br/innofactor:avm/ptn/lz/atlantis:<version>' = {
name: 'atlantisDeployment'
params: {
// Required parameters
adoUser: 'atlantis@example.com'
adoWebhookUser: 'atlantis-webhook'
atlantisExternalHostname: 'atllzmin.example.com'
azureDevOpsPat: '<azureDevOpsPat>'
azureDevOpsWebhookPassword: '<azureDevOpsWebhookPassword>'
entraTenantId: '<entraTenantId>'
inboundAllowedCidr: '10.0.0.0/8'
oauth2ClientId: '00000000-0000-0000-0000-000000000000'
oauth2ClientSecret: '<oauth2ClientSecret>'
oauth2ProxyAllowedEmailDomains: 'example.com'
oauth2ProxyCookieSecret: '<oauth2ProxyCookieSecret>'
repoAllowlist: 'dev.azure.com/example-org/*'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vnetAddressPrefix: '10.242.0.0/24'
// Non-required parameters
enableBackup: false
enableKeyVaultPurgeProtection: false
keyVaultName: '<keyVaultName>'
location: '<location>'
name: '<name>'
registryToken: '<registryToken>'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"adoUser": {
"value": "atlantis@example.com"
},
"adoWebhookUser": {
"value": "atlantis-webhook"
},
"atlantisExternalHostname": {
"value": "atllzmin.example.com"
},
"azureDevOpsPat": {
"value": "<azureDevOpsPat>"
},
"azureDevOpsWebhookPassword": {
"value": "<azureDevOpsWebhookPassword>"
},
"entraTenantId": {
"value": "<entraTenantId>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"oauth2ClientId": {
"value": "00000000-0000-0000-0000-000000000000"
},
"oauth2ClientSecret": {
"value": "<oauth2ClientSecret>"
},
"oauth2ProxyAllowedEmailDomains": {
"value": "example.com"
},
"oauth2ProxyCookieSecret": {
"value": "<oauth2ProxyCookieSecret>"
},
"repoAllowlist": {
"value": "dev.azure.com/example-org/*"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
},
// Non-required parameters
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"name": {
"value": "<name>"
},
"registryToken": {
"value": "<registryToken>"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/atlantis:<version>'
// Required parameters
param adoUser = 'atlantis@example.com'
param adoWebhookUser = 'atlantis-webhook'
param atlantisExternalHostname = 'atllzmin.example.com'
param azureDevOpsPat = '<azureDevOpsPat>'
param azureDevOpsWebhookPassword = '<azureDevOpsWebhookPassword>'
param entraTenantId = '<entraTenantId>'
param inboundAllowedCidr = '10.0.0.0/8'
oauth2ClientId: '00000000-0000-0000-0000-000000000000'
oauth2ClientSecret: '<oauth2ClientSecret>'
oauth2ProxyAllowedEmailDomains: 'example.com'
oauth2ProxyCookieSecret: '<oauth2ProxyCookieSecret>'
param repoAllowlist = 'dev.azure.com/example-org/*'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vnetAddressPrefix = '10.242.0.0/24'
// Non-required parameters
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param name = '<name>'
param registryToken = '<registryToken>'
Example 3: WAF-aligned
This instance deploys the Atlantis appliance in alignment with the best practices of the Azure Well-Architected Framework: backup, Key Vault purge protection, CanNotDelete locks on each stateful resource and deliberately NO resource-group lock (a resource-group lock stops Azure Resource Manager grooming deployment history and eventually fails every deployment), a pinned availability zone and an alert email receiver so the alerts reach someone.
via Bicep module
module atlantis 'br/innofactor:avm/ptn/lz/atlantis:<version>' = {
name: 'atlantisDeployment'
params: {
// Required parameters
adoUser: 'atlantis@example.com'
adoWebhookUser: 'atlantis-webhook'
atlantisExternalHostname: 'atllzwaf.example.com'
azureDevOpsPat: '<azureDevOpsPat>'
azureDevOpsWebhookPassword: '<azureDevOpsWebhookPassword>'
entraTenantId: '<entraTenantId>'
inboundAllowedCidr: '10.0.0.0/8'
oauth2ClientId: '00000000-0000-0000-0000-000000000000'
oauth2ClientSecret: '<oauth2ClientSecret>'
oauth2ProxyAllowedEmailDomains: 'example.com'
oauth2ProxyCookieSecret: '<oauth2ProxyCookieSecret>'
repoAllowlist: 'dev.azure.com/example-org/*'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vnetAddressPrefix: '10.242.0.0/24'
// Non-required parameters
alertEmailAddresses: [
'platform-alerts@example.com'
]
availabilityZone: 1
dataDiskSizeGB: 128
enableBackup: true
enableKeyVaultPurgeProtection: true
keyVaultName: '<keyVaultName>'
location: '<location>'
name: '<name>'
protectStatefulResources: true
registryToken: '<registryToken>'
tags: {
Environment: 'Test'
Workload: 'atlantis'
}
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"adoUser": {
"value": "atlantis@example.com"
},
"adoWebhookUser": {
"value": "atlantis-webhook"
},
"atlantisExternalHostname": {
"value": "atllzwaf.example.com"
},
"azureDevOpsPat": {
"value": "<azureDevOpsPat>"
},
"azureDevOpsWebhookPassword": {
"value": "<azureDevOpsWebhookPassword>"
},
"entraTenantId": {
"value": "<entraTenantId>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"oauth2ClientId": {
"value": "00000000-0000-0000-0000-000000000000"
},
"oauth2ClientSecret": {
"value": "<oauth2ClientSecret>"
},
"oauth2ProxyAllowedEmailDomains": {
"value": "example.com"
},
"oauth2ProxyCookieSecret": {
"value": "<oauth2ProxyCookieSecret>"
},
"repoAllowlist": {
"value": "dev.azure.com/example-org/*"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
},
// Non-required parameters
"alertEmailAddresses": {
"value": [
"platform-alerts@example.com"
]
},
"availabilityZone": {
"value": 1
},
"dataDiskSizeGB": {
"value": 128
},
"enableBackup": {
"value": true
},
"enableKeyVaultPurgeProtection": {
"value": true
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"name": {
"value": "<name>"
},
"protectStatefulResources": {
"value": true
},
"registryToken": {
"value": "<registryToken>"
},
"tags": {
"value": {
"Environment": "Test",
"Workload": "atlantis"
}
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/atlantis:<version>'
// Required parameters
param adoUser = 'atlantis@example.com'
param adoWebhookUser = 'atlantis-webhook'
param atlantisExternalHostname = 'atllzwaf.example.com'
param azureDevOpsPat = '<azureDevOpsPat>'
param azureDevOpsWebhookPassword = '<azureDevOpsWebhookPassword>'
param entraTenantId = '<entraTenantId>'
param inboundAllowedCidr = '10.0.0.0/8'
oauth2ClientId: '00000000-0000-0000-0000-000000000000'
oauth2ClientSecret: '<oauth2ClientSecret>'
oauth2ProxyAllowedEmailDomains: 'example.com'
oauth2ProxyCookieSecret: '<oauth2ProxyCookieSecret>'
param repoAllowlist = 'dev.azure.com/example-org/*'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vnetAddressPrefix = '10.242.0.0/24'
// Non-required parameters
param alertEmailAddresses = [
'platform-alerts@example.com'
]
param availabilityZone = 1
param dataDiskSizeGB = 128
param enableBackup = true
param enableKeyVaultPurgeProtection = true
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param name = '<name>'
param protectStatefulResources = true
param registryToken = '<registryToken>'
param tags = {
Environment: 'Test'
Workload: 'atlantis'
}
Parameters
Required parameters
Conditional parameters
| Parameter | Type | Description |
|---|
existingIdentityPrincipalId | string | Required if createNewManagedIdentity is false. Principal ID of the existing identity. |
existingIdentityResourceId | string | Required if createNewManagedIdentity is false. Resource ID of the existing identity to attach. |
registryToken | securestring | Required if containerRegistry.mode is keyVaultToken. A read-only registry token (read:packages) for the registry that serves the images, issued to a service identity, never to a person. Stored in the appliance Key Vault as the secret named by containerRegistry.tokenSecretName. |
Optional parameters
| Parameter | Type | Description |
|---|
activeInstance | int | activeStandby only: which host (1 or 2) the data disk is attached to when the template is deployed. After a switchover, redeploy with the number of the host that now holds the disk. |
adminUsername | string | Local admin username on the appliance VM. |
alertEmailAddresses | array | Email addresses for the appliance action group (see the container-appliance module). |
applianceSubnetNewBits | int | Prefix length of the appliance subnet, carved as the first subnet of vnetAddressPrefix with cidrSubnet() (27 = a /27). Despite the name, this is a prefix length, not a count of new bits. |
armSubscriptionId | string | Subscription ID exported to Terraform as ARM_SUBSCRIPTION_ID. Empty omits it. |
atlantisImage | string | The Atlantis image, as <registry>/<repository>:<tag>@sha256:<digest>. Always pinned by digest, so what runs is exactly what was mirrored and reviewed. The default is the private mirror of runatlantis/atlantis v0.48.0 (platform.mirror-images.yml). |
availabilityZone | int | Availability zone for the appliance. See the container-appliance module. |
containerRegistry | object | How the hosts pull the Atlantis and oauth2-proxy images. The default pulls the private mirror at ghcr.io/innofactororg/mirror with a read-only token held in the appliance Key Vault (mode keyVaultToken, secret registry-token, filled from registryToken). Use mode anonymous when the image parameters name a public registry. |
createNatGateway | bool | Create and associate a NAT Gateway for outbound egress — see the container-appliance module for why this cannot default to false without an alternative egress path. |
createNewManagedIdentity | bool | Create a new user-assigned identity (true, the product default) or attach an existing one (false). |
dataDiskSizeGB | int | Size in GB of the dedicated Atlantis data disk. |
defaultRouteNextHopIpAddress | string | Next-hop IP for a 0.0.0.0/0 route on the appliance subnet. See the container-appliance module. |
dnsServers | array | Custom DNS servers for the appliance VNet. |
enableBackup | bool | Back up the VMs with Azure Backup. Default true; keep it on for anything real. See the container-appliance module for why tests turn it off. |
enableKeyVaultPurgeProtection | bool | Purge protection on the appliance Key Vault. Default true. |
enablePatchSchedule | bool | Attach the VM to the patch window. False leaves patching to Azure, at times Azure chooses. |
enablePolicyChecks | bool | Start Atlantis with –enable-policy-checks. See atlantis.bicep. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
hostPrivateIpAddress | string | Static private IP for the appliance VM, inside the appliance’s own subnet. See the container-appliance module for the default. |
itsmWebhookUri | string | ITSM webhook URI for the action group. |
keyVaultName | string | Name of the appliance Key Vault. Empty derives it from the name. See the container-appliance module. |
location | string | Azure region to deploy the resources. |
lock | object | A lock to apply to the whole resource group. NOT recommended: it stops Azure Resource Manager grooming deployment history and eventually fails every deployment. Use protectStatefulResources instead. |
maintenanceWindow | object | Monthly in-guest patch window (Azure Update Manager maintenance configuration). See the container-appliance module for the default and why the schedule is dedicated. |
name | string | Prefix for resource names, and the name of the single resource group created. |
oauth2ProxyImage | string | The oauth2-proxy image, as <registry>/<repository>:<tag>@sha256:<digest>. The default is the private mirror of oauth2-proxy v7.15.5. |
oauth2ProxyOidcEmailClaim | string | The ID-token claim oauth2-proxy treats as the user’s email. See atlantis.bicep. |
oauth2ProxyPort | int | Port oauth2-proxy listens on. |
protectStatefulResources | bool | CanNotDelete locks on each resource that holds state, instead of on the resource group. See the container-appliance module for why a resource-group lock is the wrong tool. |
repoConfig | string | Content of the Atlantis server-side repo config (repos.yaml). See atlantis.bicep — a deployment replacing an existing Atlantis server MUST carry that server’s repo config. |
roleAssignments | array | Additional role assignments to grant on the resource group. |
scaleMode | string | activeStandby (default): two hosts in one zone, one data disk attached to the active host, a blob lease so only that host runs Atlantis, and an internal load balancer that sends traffic to the host that serves. single: one VM. Atlantis keeps its state (BoltDB, plan cache, lock table) on the data disk and runs one operation at a time against it, so loadBalanced is not offered. See ADR 14. |
tags | object | Tags applied to every resource. |
terraformLinuxAmd64Sha256 | string | SHA-256 of terraform_<terraformVersion>_linux_amd64.zip, from https://releases.hashicorp.com/terraform/<version>/terraform_<version>_SHA256SUMS. Must match terraformVersion: the bootstrap fails, and so does the deployment, when the download does not match. |
terraformVersion | string | Default Terraform version Atlantis pins per plan. |
virtualNetworkPeerings | array | VNet peerings in the AVM shape. A remote side is a write outside the appliance resource group. |
vmSize | string | VM size. MUST NOT be a burstable (B-series) SKU — see atlantis.bicep. |
workspaceResourceId | string | Resource ID of an existing Log Analytics Workspace. |
Parameter: adoUser
Azure DevOps username Atlantis authenticates to the API as.
- Required: Yes
- Type: string
Parameter: adoWebhookUser
Basic-auth username for inbound Azure DevOps webhook calls.
- Required: Yes
- Type: string
Parameter: atlantisExternalHostname
Public hostname the appliance is reached at.
- Required: Yes
- Type: string
Parameter: azureDevOpsPat
Azure DevOps Personal Access Token.
- Required: Yes
- Type: securestring
Parameter: azureDevOpsWebhookPassword
Azure DevOps inbound webhook basic-auth password.
- Required: Yes
- Type: securestring
Parameter: entraTenantId
Entra tenant ID used as the OIDC issuer for oauth2-proxy.
- Required: Yes
- Type: string
Parameter: inboundAllowedCidr
CIDR allowed inbound to the appliance on oauth2ProxyPort: the publishing gateway’s subnet.
- Required: Yes
- Type: string
Parameter: oauth2ClientId
Entra App Registration client ID for oauth2-proxy — PREREQUISITE, not created by this template.
- Required: Yes
- Type: string
Parameter: oauth2ClientSecret
Entra App Registration client secret for oauth2-proxy.
- Required: Yes
- Type: securestring
Parameter: oauth2ProxyAllowedEmailDomains
Comma-separated list of email domains oauth2-proxy allows through.
- Required: Yes
- Type: string
Parameter: oauth2ProxyCookieSecret
oauth2-proxy session cookie encryption secret.
- Required: Yes
- Type: securestring
Parameter: repoAllowlist
Repository allowlist pattern for Atlantis.
- Required: Yes
- Type: string
Parameter: sshPublicKey
SSH public key for the admin account.
- Required: Yes
- Type: string
Parameter: vnetAddressPrefix
Address space for the appliance’s own VNet. See the container-appliance module for the full description.
- Required: Yes
- Type: string
Parameter: existingIdentityPrincipalId
Required if createNewManagedIdentity is false. Principal ID of the existing identity.
- Required: No
- Type: string
- Default:
''
Parameter: existingIdentityResourceId
Required if createNewManagedIdentity is false. Resource ID of the existing identity to attach.
- Required: No
- Type: string
- Default:
''
Parameter: registryToken
Required if containerRegistry.mode is keyVaultToken. A read-only registry token (read:packages) for the registry that serves the images, issued to a service identity, never to a person. Stored in the appliance Key Vault as the secret named by containerRegistry.tokenSecretName.
- Required: No
- Type: securestring
- Default:
''
Parameter: activeInstance
activeStandby only: which host (1 or 2) the data disk is attached to when the template is deployed. After a switchover, redeploy with the number of the host that now holds the disk.
- Required: No
- Type: int
- Default:
1 - Allowed:
Parameter: adminUsername
Local admin username on the appliance VM.
- Required: No
- Type: string
- Default:
'atlantisadmin'
Parameter: alertEmailAddresses
Email addresses for the appliance action group (see the container-appliance module).
- Required: No
- Type: array
- Default:
[]
Parameter: applianceSubnetNewBits
Prefix length of the appliance subnet, carved as the first subnet of vnetAddressPrefix with cidrSubnet() (27 = a /27). Despite the name, this is a prefix length, not a count of new bits.
- Required: No
- Type: int
- Default:
27
Parameter: armSubscriptionId
Subscription ID exported to Terraform as ARM_SUBSCRIPTION_ID. Empty omits it.
- Required: No
- Type: string
- Default:
''
Parameter: atlantisImage
The Atlantis image, as <registry>/<repository>:<tag>@sha256:<digest>. Always pinned by digest, so what runs is exactly what was mirrored and reviewed. The default is the private mirror of runatlantis/atlantis v0.48.0 (platform.mirror-images.yml).
- Required: No
- Type: string
- Default:
'ghcr.io/innofactororg/mirror/atlantis:v0.48.0@sha256:8dd77ed01565f797fe62922f4670398b16a094597b36dedd6e806490177fffd9'
Parameter: availabilityZone
Availability zone for the appliance. See the container-appliance module.
- Required: No
- Type: int
- Default:
1 - Allowed:
Parameter: containerRegistry
How the hosts pull the Atlantis and oauth2-proxy images. The default pulls the private mirror at ghcr.io/innofactororg/mirror with a read-only token held in the appliance Key Vault (mode keyVaultToken, secret registry-token, filled from registryToken). Use mode anonymous when the image parameters name a public registry.
- Required: No
- Type: object
- Default:
{
mode: 'keyVaultToken'
server: 'ghcr.io'
tokenSecretName: 'registry-token'
}
Required parameters
| Parameter | Type | Description |
|---|
mode | string | How to authenticate: anonymous, managedIdentity or keyVaultToken. |
server | string | Registry server name, for example contoso.azurecr.io. Empty with mode anonymous. |
Conditional parameters
| Parameter | Type | Description |
|---|
tokenSecretName | string | Required if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token. |
Optional parameters
| Parameter | Type | Description |
|---|
registryResourceId | string | managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it. |
tokenUsername | string | keyVaultToken only: the user name that goes with the token. |
Parameter: containerRegistry.mode
How to authenticate: anonymous, managedIdentity or keyVaultToken.
- Required: Yes
- Type: string
- Allowed:
[
'anonymous'
'keyVaultToken'
'managedIdentity'
]
Parameter: containerRegistry.server
Registry server name, for example contoso.azurecr.io. Empty with mode anonymous.
- Required: Yes
- Type: string
Parameter: containerRegistry.tokenSecretName
Required if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token.
Parameter: containerRegistry.registryResourceId
managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.
Parameter: containerRegistry.tokenUsername
keyVaultToken only: the user name that goes with the token.
Parameter: createNatGateway
Create and associate a NAT Gateway for outbound egress — see the container-appliance module for why this cannot default to false without an alternative egress path.
- Required: No
- Type: bool
- Default:
True
Parameter: createNewManagedIdentity
Create a new user-assigned identity (true, the product default) or attach an existing one (false).
- Required: No
- Type: bool
- Default:
True
Parameter: dataDiskSizeGB
Size in GB of the dedicated Atlantis data disk.
- Required: No
- Type: int
- Default:
128
Parameter: defaultRouteNextHopIpAddress
Next-hop IP for a 0.0.0.0/0 route on the appliance subnet. See the container-appliance module.
- Required: No
- Type: string
- Default:
''
Parameter: dnsServers
Custom DNS servers for the appliance VNet.
- Required: No
- Type: array
- Default:
[]
Parameter: enableBackup
Back up the VMs with Azure Backup. Default true; keep it on for anything real. See the container-appliance module for why tests turn it off.
- Required: No
- Type: bool
- Default:
True
Parameter: enableKeyVaultPurgeProtection
Purge protection on the appliance Key Vault. Default true.
- Required: No
- Type: bool
- Default:
True
Parameter: enablePatchSchedule
Attach the VM to the patch window. False leaves patching to Azure, at times Azure chooses.
- Required: No
- Type: bool
- Default:
True
Parameter: enablePolicyChecks
Start Atlantis with –enable-policy-checks. See atlantis.bicep.
- Required: No
- Type: bool
- Default:
False
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: hostPrivateIpAddress
Static private IP for the appliance VM, inside the appliance’s own subnet. See the container-appliance module for the default.
- Required: No
- Type: string
- Default:
''
Parameter: itsmWebhookUri
ITSM webhook URI for the action group.
- Required: No
- Type: string
- Default:
''
Parameter: keyVaultName
Name of the appliance Key Vault. Empty derives it from the name. See the container-appliance module.
- Required: No
- Type: string
- Default:
''
Parameter: location
Azure region to deploy the resources.
- Required: No
- Type: string
- Default:
'westeurope'
Parameter: lock
A lock to apply to the whole resource group. NOT recommended: it stops Azure Resource Manager grooming deployment history and eventually fails every deployment. Use protectStatefulResources instead.
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | The lock kind. |
name | string | Name of the lock. |
notes | string | Notes about this lock. |
Parameter: lock.kind
The lock kind.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
Parameter: lock.name
Name of the lock.
Parameter: lock.notes
Notes about this lock.
Parameter: maintenanceWindow
Monthly in-guest patch window (Azure Update Manager maintenance configuration). See the container-appliance module for the default and why the schedule is dedicated.
Parameter: name
Prefix for resource names, and the name of the single resource group created.
- Required: No
- Type: string
- Default:
'atlantis'
Parameter: oauth2ProxyImage
The oauth2-proxy image, as <registry>/<repository>:<tag>@sha256:<digest>. The default is the private mirror of oauth2-proxy v7.15.5.
- Required: No
- Type: string
- Default:
'ghcr.io/innofactororg/mirror/oauth2-proxy:v7.15.5@sha256:8498b0d0ef0a7b29686414000a08aee467f02d0299c9ed1e006a8f33fc017916'
Parameter: oauth2ProxyOidcEmailClaim
The ID-token claim oauth2-proxy treats as the user’s email. See atlantis.bicep.
- Required: No
- Type: string
- Default:
'email'
Parameter: oauth2ProxyPort
Port oauth2-proxy listens on.
- Required: No
- Type: int
- Default:
4141
Parameter: protectStatefulResources
CanNotDelete locks on each resource that holds state, instead of on the resource group. See the container-appliance module for why a resource-group lock is the wrong tool.
- Required: No
- Type: bool
- Default:
True
Parameter: repoConfig
Content of the Atlantis server-side repo config (repos.yaml). See atlantis.bicep — a deployment replacing an existing Atlantis server MUST carry that server’s repo config.
- Required: No
- Type: string
- Default:
''
Parameter: roleAssignments
Additional role assignments to grant on the resource group.
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the user, group, or service principal to assign the role to. |
roleDefinitionIdOrName | string | The role to assign — either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription). |
Optional parameters
| Parameter | Type | Description |
|---|
principalType | string | The principal type of the assigned principal ID. |
Parameter: roleAssignments.principalId
The principal ID of the user, group, or service principal to assign the role to.
- Required: Yes
- Type: string
Parameter: roleAssignments.roleDefinitionIdOrName
The role to assign — either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription).
- Required: Yes
- Type: string
Parameter: roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
Parameter: scaleMode
activeStandby (default): two hosts in one zone, one data disk attached to the active host, a blob lease so only that host runs Atlantis, and an internal load balancer that sends traffic to the host that serves. single: one VM. Atlantis keeps its state (BoltDB, plan cache, lock table) on the data disk and runs one operation at a time against it, so loadBalanced is not offered. See ADR 14.
- Required: No
- Type: string
- Default:
'activeStandby' - Allowed:
[
'activeStandby'
'single'
]
Tags applied to every resource.
SHA-256 of terraform_<terraformVersion>_linux_amd64.zip, from https://releases.hashicorp.com/terraform/<version>/terraform_<version>_SHA256SUMS. Must match terraformVersion: the bootstrap fails, and so does the deployment, when the download does not match.
- Required: No
- Type: string
- Default:
'dc94af0eef1147718ad7c8daea792ed199e3e0492eec180d0adafa2a65a879df'
Default Terraform version Atlantis pins per plan.
- Required: No
- Type: string
- Default:
'1.16.4'
Parameter: virtualNetworkPeerings
VNet peerings in the AVM shape. A remote side is a write outside the appliance resource group.
- Required: No
- Type: array
- Default:
[]
Parameter: vmSize
VM size. MUST NOT be a burstable (B-series) SKU — see atlantis.bicep.
- Required: No
- Type: string
- Default:
'Standard_D2as_v5'
Parameter: workspaceResourceId
Resource ID of an existing Log Analytics Workspace.
- Required: No
- Type: string
- Default:
''
Outputs
| Output | Type | Description |
|---|
applianceAddress | string | Address clients reach the appliance on: the internal load balancer frontend in activeStandby, the host private IP in single. |
applianceHostNames | array | Names of the appliance hosts. |
applianceHostResourceIds | array | Resource IDs of the appliance hosts. |
applianceSubnetResourceId | string | Resource ID of the appliance subnet. |
applianceVmPrivateIpAddress | string | Static private IP of the appliance VM: the publishing gateway’s backend target. |
applianceVmResourceId | string | Resource ID of the appliance VM. |
dataDiskName | string | Name of the data disk that holds the Atlantis state. |
keyVaultName | string | Name of the appliance’s own Key Vault. |
keyVaultUri | string | URI of the appliance’s own Key Vault. |
manualStepsRequiredForReuse | array | Role assignments the template could not make because the identity was reused. Empty for a new identity. |
tfStateContainerName | string | Blob container holding Terraform state. |
tfStateStorageAccountName | string | Storage account holding Terraform state (RBAC only, no shared keys). |
virtualNetworkResourceId | string | Resource ID of the appliance VNet, for peerings. |
vmIdentityPrincipalId | string | Principal ID of the identity Terraform runs as. Grant it the roles each target landing zone needs. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/ptn/lz/container-appliance:0.1.0 | Remote reference |
br/public:avm/res/resources/resource-group:0.4.1 | Remote reference |
br/public:avm/res/storage/storage-account:0.14.3 | Remote reference |
Notes
What it deploys
A subscription-scope deployment that creates one resource group and everything inside it, in three layers:
| Layer | Scope | Contents |
|---|
main.bicep | Subscription | Creates the resource group and invokes atlantis.bicep. It writes nothing outside the resource group: the hub return route is a prerequisite (see below). |
atlantis.bicep | Resource group | Everything specific to Atlantis: the Terraform state storage account (resource-level lock, RBAC only, no shared keys), the Docker Compose stack for Atlantis and oauth2-proxy, Atlantis’s server configuration, the one-minute depth probe and its two alerts. |
br/innofactor:avm/ptn/lz/container-appliance:0.1.0 | Resource group | The payload-agnostic infrastructure, published as its own pattern module: VNet and subnet, NSG, optional NAT Gateway, Ubuntu VM with a separate data disk, user-assigned identity (new or reused), the Key Vault the VM reads its four secrets from, Recovery Services backup, Log Analytics and data collection rule, action group, CPU and heartbeat alerts, a health workbook and a dedicated patch window. It contains no reference to Atlantis. |
This module therefore depends on a published version of container-appliance. Its behaviour, the payload contract it exposes and its own operational constraints (locks, identity reuse, data disk, patching, backup) are documented in that module’s README; the parameters below that pass straight through (vnetAddressPrefix, createNatGateway, maintenanceWindow, protectStatefulResources and so on) are described there in full.
Traffic shape: Azure DevOps service hooks post to /events, which bypasses oauth2-proxy and is protected by the webhook basic-auth credential alone. Everything else (/, the lock UI) goes through oauth2-proxy and Entra sign-in. /healthz is unauthenticated so an upstream health probe does not see a login redirect. The images come from the Innofactor private mirror (ghcr.io/innofactororg/mirror), pinned by digest, and are pulled with a read-only registry token held in the appliance Key Vault (containerRegistry mode keyVaultToken, token in registryToken); the agent logs in only while it pulls. Point atlantisImage, oauth2ProxyImage and containerRegistry at your own mirror to use another registry.
The method (onboarding, cutover, operations runbooks and the design rationale) lives in the Innofactor practice repository under ip-library/atlantis/. This module is the deployable half; read the method before the first deployment.
- Scale mode.
scaleMode is activeStandby (default: two hosts in one zone, one data disk, a blob lease and an internal load balancer) or single. The data disk is the disk that is moved; activeInstance says which host it is attached to at deployment time. - Seeding the data disk. The agent mounts the data disk after the bootstrap commands run, so the bootstrap writes the seed (
repos.yaml, .gitconfig, the pinned Terraform binary) under the compose directory, and the one-shot atlantis-init service copies it into the data disk and fixes ownership every time the stack starts. - Pinned toolchain. Terraform
terraformVersion is downloaded once on each host, checked against terraformLinuxAmd64Sha256 and given to Atlantis as its default version. A checksum mismatch fails the deployment. Atlantis does not download Terraform itself unless a repository asks for another version. - Drain. Before a switchover, scale-in or shutdown the agent runs a drain command that polls Atlantis
/status and waits (up to about four and a half minutes) until no operation is in progress. - Logs. The containers log to journald, which the appliance’s data collection rule ships to Log Analytics.
Seed templates
The templates in seed/ are deployed once, by hand, before the first deployment, because a pipeline cannot create what it runs under.
| File | Creates |
|---|
seed/seed-vault.bicep | A separate Key Vault (own resource group, own lifecycle) holding the four deployment secrets, read at deploy time with getSecret() so no pipeline ever handles a secret. |
seed/pipeline-identity.bicep | A user-assigned managed identity with a workload-identity-federation credential for the Azure DevOps service connection: Owner on the subscription, plus Managed Identity Operator on a reused appliance identity when one is used. Two passes (see the file header). |
Prerequisites
None of these are created by the template. Work through them in order; items 1–3 must be in
place before the VM is created, because the bootstrap installs Docker and pulls the images
during VM provisioning and fails the deployment if it has no egress.
Subscription and address range registered. A subscription for the appliance, and a spoke
VNet address range (vnetAddressPrefix, a /24 is ample; the appliance subnet is carved with
applianceSubnetNewBits) registered in the estate’s IPAM so it cannot collide with another
spoke.
Hub firewall egress allow-list (only when egress goes through a hub firewall,
createNatGateway = false + defaultRouteNextHopIpAddress). A missing entry shows as a deny
in the firewall log, not as an Atlantis error. At minimum:
- Azure DevOps:
dev.azure.com, vssps.dev.azure.com, vsaex.dev.azure.com (the latter two
are used by the identity and entitlement APIs behind the PAT scopes below) - Terraform:
registry.terraform.io, releases.hashicorp.com, github.com,
objects.githubusercontent.com (providers and modules hosted on GitHub) - Container registries:
ghcr.io, pkg-containers.githubusercontent.com (Atlantis),
quay.io and its CDN (oauth2-proxy) - Docker packages:
download.docker.com - Ubuntu packages and patching: the Azure Ubuntu archive mirror,
esm.ubuntu.com,
livepatch.canonical.com - Azure control and data plane:
login.microsoftonline.com, management.azure.com,
*.vault.azure.net, *.blob.core.windows.net (Terraform state), and the Azure Monitor
agent endpoints (global.handler.control.monitor.azure.com, *.ods.opinsights.azure.com,
*.ingest.monitor.azure.com)
With the NAT Gateway (the default), none of this is needed. Beware the reverse trap: if the VNet
is later peered to a hub that advertises 0.0.0.0/0, that route overrides the NAT Gateway
and silently redirects egress through the hub firewall.
Publishing gateway listener and DNS. A public listener for atlantisExternalHostname on the
estate’s publishing gateway (for example an Application Gateway with WAF) whose backend is
applianceAddress:oauth2ProxyPort (the internal load balancer in activeStandby, the host in single), the DNS record for that hostname, and a DNS route from
the appliance VNet to the estate’s domain controllers or resolvers through the hub (dnsServers
plus a peering) if Terraform must resolve private endpoints. When traffic arrives over the hub, the hub needs a return route for this
appliance’s address space: this module does not write it. Add it with the hubReturnRoutes parameter of
workload-networking 0.4.11.
Entra app registration for oauth2-proxy. Web platform, redirect URI
https://<atlantisExternalHostname>/oauth2/callback, a client secret. Supply the client ID as
oauth2ClientId; the secret goes into the seed vault.
Seed Key Vault with the four secrets. Deploy seed/seed-vault.bicep, then write:
| Secret name | Parameter | Content |
|---|
atlantis-ado-pat | azureDevOpsPat | The service account’s PAT (item 6) |
atlantis-webhook-password | azureDevOpsWebhookPassword | Random, letters and digits only (a $ is read by Docker Compose as a variable); the service hooks present it with adoWebhookUser |
oauth2-proxy-client-secret | oauth2ClientSecret | The app registration’s secret (item 4) |
oauth2-proxy-cookie-secret | oauth2ProxyCookieSecret | openssl rand -base64 32 | tr -- '+/' '-_' (URL-safe: oauth2-proxy rejects a standard base64 value containing + or /) |
Secrets are changed in the seed vault and then redeployed, never edited in the appliance’s
own vault, which the next deployment overwrites.
Azure DevOps service account and PAT. A dedicated, non-personal account (adoUser) with a
PAT carrying exactly these scopes: vso.code_write, vso.code_status, vso.threads_full,
vso.build_execute, vso.project, vso.memberentitlementmanagement. Give the account View
and Edit subscriptions in the Service Hooks permission namespace of each project it serves
(see “Service hooks” below). Put its repositories in repoAllowlist.
Managed identity and grants per target landing zone. The VM identity (new, or reused via
existingIdentityResourceId) is what Terraform runs as. Grant it, on every landing zone
Atlantis will apply to, the roles those Terraform roots need, and nothing broader. A reused
identity also needs the roles listed in the manualStepsRequiredForReuse output (Key Vault
Secrets User on the appliance vault, Storage Blob Data Contributor on the state account), and
whoever deploys needs Managed Identity Operator on it. Treat the grant set as a
privilege-escalation review: whoever can merge to an onboarded repository acts with these rights.
Policy exemption for resource-group delete-lock enforcers. Do not lock the resource
group (leave lock unset). A CanNotDelete lock on the group stops Azure Resource Manager
grooming deployment history, and once the group reaches the 800-record ceiling every deployment
into it fails. If the estate stamps resource-group delete locks by policy, add a policy
exemption (category Mitigated) for this resource group after the first deployment and delete the
stamped lock. The stateful resources (VM, OS and data disks, Key Vault, Log Analytics workspace when created, Recovery Services vault, Terraform state storage) carry
their own resource-level locks through protectStatefulResources (default true).
An action group receiver. Set alertEmailAddresses and/or itsmWebhookUri. The alerts are
always created, but an action group with no receiver delivers nothing.
Consuming the module from a wrapper
targetScope = 'subscription'
resource seedVault 'Microsoft.KeyVault/vaults@2023-07-01' existing = {
name: '<seed vault name>'
scope: resourceGroup('atlantis-secrets')
}
module atlantis 'br/innofactor:avm/ptn/lz/atlantis:0.1.0' = {
name: 'atlantis-appliance'
params: {
name: 'atlantis'
location: 'westeurope'
vnetAddressPrefix: '10.242.0.0/24'
inboundAllowedCidr: '<publishing gateway subnet CIDR>'
sshPublicKey: '<ssh-ed25519 public key>'
atlantisExternalHostname: 'atlantis.example.com'
repoAllowlist: 'dev.azure.com/<organisation>/*'
adoUser: 'atlantis@example.com'
adoWebhookUser: 'atlantis'
entraTenantId: tenant().tenantId
oauth2ClientId: '<app registration client ID>'
oauth2ProxyAllowedEmailDomains: 'example.com'
azureDevOpsPat: seedVault.getSecret('atlantis-ado-pat')
azureDevOpsWebhookPassword: seedVault.getSecret('atlantis-webhook-password')
oauth2ClientSecret: seedVault.getSecret('oauth2-proxy-client-secret')
oauth2ProxyCookieSecret: seedVault.getSecret('oauth2-proxy-cookie-secret')
alertEmailAddresses: [
'platform-alerts@example.com'
]
// Hub-and-spoke egress instead of the NAT Gateway (prerequisite 2 must be in place first):
// createNatGateway: false
// defaultRouteNextHopIpAddress: '<hub firewall private IP>'
// dnsServers: [ '<DNS server IP>' ]
}
}
The same values work as a .bicepparam file with az.getSecret('<sub>', '<rg>', '<vault>', '<secret>').
The tests in tests/e2e/ (defaults, waf-aligned, active-standby) show the minimum and the recommended
parameter sets; their examples are listed under Usage examples above.
Deploying from an Azure DevOps pipeline
The pipeline handles no secrets. It signs in through the workload-identity-federation service
connection created for seed/pipeline-identity.bicep, validates, shows a what-if, and deploys
behind an environment approval.
trigger:
branches:
include: [main]
pool:
vmImage: ubuntu-latest
variables:
serviceConnection: '<service connection name>'
location: westeurope
stages:
- stage: Plan
jobs:
- job: whatif
steps:
- task: AzureCLI@2
displayName: Validate and what-if
inputs:
azureSubscription: $(serviceConnection)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az deployment sub validate --location $(location) \
--template-file main.bicep --parameters main.bicepparam
az deployment sub what-if --location $(location) \
--template-file main.bicep --parameters main.bicepparam
- stage: Deploy
dependsOn: Plan
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: deploy
environment: atlantis # add an approval check on this environment
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: AzureCLI@2
displayName: Deploy
inputs:
azureSubscription: $(serviceConnection)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az deployment sub create --name atlantis-appliance --location $(location) \
--template-file main.bicep --parameters main.bicepparam
Before the deploy step, check the what-if for any change under dataDisks (see the first
operational constraint) and, if one is present, schedule the run as an outage.
Operational constraints
A data-disk property change on a running VM is an outage. Azure applies any change under
dataDisks (caching, size, SKU) by hot-detaching and re-attaching the disk. The guest kernel
takes the device offline and the ext4 filesystem holding Atlantis’s lock database, clones and
plan cache does not survive it, while the web UI and /healthz keep answering. Schedule the
change, restart the VM straight afterwards, and check the mount. The disk is mounted by UUID
with nofail, so it remounts cleanly on restart.
Service hooks run as their last modifier. Azure DevOps evaluates a service hook as the
identity that last saved it. If that person loses access (for example, is offboarded), every
event is recorded as filtered in the hook’s delivery history and never sent, and nothing in
Atlantis shows an error. Create and save every hook as the Atlantis service account, never
as a person, and check hook ownership before anyone with project-admin rights leaves. A read of
an existing hook returns the password masked, so any save must supply it again.
Four service hooks per repository, all posting to https://<atlantisExternalHostname>/events
with the full message and the webhook credential:
| Event | Filter | Purpose |
|---|
| Pull request created | — | Autoplan |
| Pull request updated | “Source branch updated” (PushNotification) | Autoplan on every push |
| Pull request updated | “Status changed” (StatusUpdateNotification) | On merge or abandon, release the PR’s locks and plans |
| Pull request commented on | — | atlantis plan / atlantis apply comment commands |
Do not subscribe votes or reviewer changes, and do not collapse the two “updated” hooks into one
unfiltered hook: every approval vote would trigger an autoplan that collides with Atlantis’s
one-command-per-PR lock. Without the status hook, merged PRs keep their locks and block later
PRs on the same projects. Then add the repository to repoAllowlist and give it an
atlantis.yaml.
Probe alert threshold. The depth probe runs every minute and checks /healthz, the Azure
DevOps API, the Terraform binary, the lock database, both containers and free disk space. The
probe alert fires when the last 10 minutes hold two or more failed runs, or fewer than five
runs at all (a silent probe means the VM, the timer or log collection is down). A single failed
minute does not fire. A second alert fires below 15% free on the OS or data disk. The web UI and
/healthz can be green while Atlantis is broken, so read the probe before any cutover, apply
window or sign-off.
Never -out a tfplan outside Atlantis, and never commit one. A saved plan file contains
every variable and resource attribute in clear text, secrets included. Atlantis manages its own
plan files on the data disk; run ad-hoc plans without -out.
One instance per state, moved on purpose. Atlantis’s locking is in-process and its BoltDB takes an
exclusive file lock, so it cannot run active-active. In activeStandby the second host is a cold
standby: only the host that holds the blob lease runs Atlantis, and the data disk is attached to that
host alone. A switchover is a control-plane operation (the agent never moves disks): release the lease
on the active host (appliance-agent.sh release, which first runs the drain hook and waits for Atlantis
to report no operation in progress), detach the disk, attach it to the other host, then redeploy with
activeInstance set to the host that now holds the disk. See ADR 0014.
A server replacing an existing Atlantis must carry that server’s repo config in
repoConfig; without it, approved stops being an apply requirement.
repoAllowlist must be one organisation-wide pattern of the form dev.azure.com/<organisation>/*.
The depth probe derives its Azure DevOps API URL from it by stripping /*, so a
comma-separated list or a per-project pattern produces a probe URL that always fails, and the
probe alert fires permanently.
Files
main.bicep / main.json: subscription-scope entry point and its compiled formatlantis.bicep: the Atlantis workload layer (resource-group scope)seed/: the seed vault and pipeline identity, deployed once by handtests/e2e/defaults, tests/e2e/waf-aligned, tests/e2e/active-standby: end-to-end tests (the last one also performs a switchover)
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.1.0
Changes
- First release of the module. A self-hosted Atlantis server for Terraform pull-request automation on Azure DevOps, delivered on the
container-appliance pattern module (0.1.0). See the README for parameters and examples. - Runs as an active/standby pair by default (
scaleMode), with single for one host. The data disk is the disk that moves on a switchover; the drain hook waits for Atlantis to finish running operations. - Images are the digest-pinned Innofactor private mirror (
atlantisImage, oauth2ProxyImage), pulled with a read-only token from the appliance Key Vault (containerRegistry mode keyVaultToken, registryToken). - Terraform is pinned by version and SHA-256 (
terraformVersion, terraformLinuxAmd64Sha256). - The module does not write hub routes. The return route is a prerequisite, set with workload-networking
hubReturnRoutes (0.4.11).
Breaking Changes
Version history
| Version | Published |
|---|
0.1.0 | 2026-11-14 |
Container Appliance Landing Zone
br/innofactor:avm/ptn/lz/container-appliance:0.2.1
README
Container Appliance [Lz/ContainerAppliance]
Payload-agnostic container appliance. One resource group holds a VNet and subnet with an NSG, an optional NAT Gateway (or a subnet the caller brings), a user-assigned managed identity, a Key Vault, Recovery Services backup, Log Analytics with a data collection rule, alerting, a health workbook, a patch schedule, and Ubuntu hosts running Docker that start ONE compose stack supplied by the caller.
Three scale modes decide how many hosts there are and what happens when one fails: single (one VM, the default), activeStandby (two VMs, one data disk that follows the active host, a blob lease, an internal load balancer whose probe keeps the passive host out of service) and loadBalanced (a Flexible scale set behind an internal load balancer).
The module knows nothing about what it hosts. It accepts an already-rendered docker-compose.yml, a named set of Key Vault secrets, and a list of env files to derive from those secrets at boot, and it never parses any of them. A workload module (a second module that consumes this one) supplies the compose file, secrets, inbound ports and any resource its payload needs that every payload would not need.
What belongs here and what does not: anything that every payload needs lives in this module (network, VM and disks, identity, runtime secret store, backup, monitoring, patching, generic alerts). Anything that only one payload needs lives in that payload’s module.
See the Notes section for prerequisites, the payload contract and the operational constraints.
Navigation
Resource Types
| Resource Type | API Version |
|---|
Microsoft.Authorization/locks | 2020-05-01 |
Microsoft.Authorization/policyAssignments | 2024-04-01 |
Microsoft.Authorization/roleAssignments | 2022-04-01 |
Microsoft.Automanage/configurationProfileAssignments | 2022-05-04 |
Microsoft.Compute/disks | 2024-03-02 |
Microsoft.Compute/virtualMachines | 2024-07-01 |
Microsoft.Compute/virtualMachines/extensions | 2022-11-01 |
Microsoft.Compute/virtualMachineScaleSets | 2024-07-01 |
Microsoft.DevTestLab/schedules | 2018-09-15 |
Microsoft.GuestConfiguration/guestConfigurationAssignments | 2020-06-25 |
Microsoft.Insights/actionGroups | 2023-01-01 |
Microsoft.Insights/dataCollectionRuleAssociations | 2023-03-11 |
Microsoft.Insights/dataCollectionRules | 2023-03-11 |
Microsoft.Insights/diagnosticSettings | 2021-05-01-preview |
Microsoft.Insights/metricAlerts | 2018-03-01 |
Microsoft.Insights/scheduledQueryRules | 2025-01-01-preview |
Microsoft.Insights/workbooks | 2023-06-01 |
Microsoft.KeyVault/vaults | 2024-11-01 |
Microsoft.KeyVault/vaults/accessPolicies | 2024-11-01 |
Microsoft.KeyVault/vaults/keys | 2024-11-01 |
Microsoft.KeyVault/vaults/secrets | 2024-11-01 |
Microsoft.Maintenance/configurationAssignments | 2023-04-01 |
Microsoft.Maintenance/maintenanceConfigurations | 2023-04-01 |
Microsoft.ManagedIdentity/userAssignedIdentities | 2024-11-30 |
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials | 2024-11-30 |
Microsoft.Network/loadBalancers | 2024-05-01 |
Microsoft.Network/natGateways | 2023-04-01 |
Microsoft.Network/networkInterfaces | 2024-05-01 |
Microsoft.Network/networkSecurityGroups | 2023-11-01 |
Microsoft.Network/privateEndpoints | 2023-11-01 |
Microsoft.Network/privateEndpoints | 2024-10-01 |
Microsoft.Network/privateEndpoints | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2023-11-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-10-01 |
Microsoft.Network/publicIPAddresses | 2023-09-01 |
Microsoft.Network/publicIPAddresses | 2024-05-01 |
Microsoft.Network/publicIPPrefixes | 2023-09-01 |
Microsoft.Network/routeTables | 2024-05-01 |
Microsoft.Network/virtualNetworks | 2024-05-01 |
Microsoft.Network/virtualNetworks/subnets | 2024-05-01 |
Microsoft.Network/virtualNetworks/virtualNetworkPeerings | 2024-01-01 |
Microsoft.OperationalInsights/workspaces | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/dataExports | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/dataSources | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/linkedServices | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/linkedStorageAccounts | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/savedSearches | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/storageInsightConfigs | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/tables | 2025-02-01 |
Microsoft.OperationsManagement/solutions | 2015-11-01-preview |
Microsoft.PolicyInsights/remediations | 2021-10-01 |
Microsoft.RecoveryServices/vaults | 2024-04-01 |
Microsoft.RecoveryServices/vaults/backupconfig | 2023-01-01 |
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems | 2023-01-01 |
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems | 2024-10-01 |
Microsoft.RecoveryServices/vaults/backupPolicies | 2024-10-01 |
Microsoft.RecoveryServices/vaults/backupstorageconfig | 2023-01-01 |
Microsoft.RecoveryServices/vaults/replicationAlertSettings | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationPolicies | 2023-06-01 |
Microsoft.SecurityInsights/onboardingStates | 2024-03-01 |
Microsoft.Storage/storageAccounts | 2025-06-01 |
Microsoft.Storage/storageAccounts/blobServices | 2025-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers | 2025-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies | 2025-01-01 |
Microsoft.Storage/storageAccounts/fileServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/fileServices/shares | 2025-01-01 |
Microsoft.Storage/storageAccounts/localUsers | 2025-06-01 |
Microsoft.Storage/storageAccounts/managementPolicies | 2025-06-01 |
Microsoft.Storage/storageAccounts/objectReplicationPolicies | 2025-01-01 |
Microsoft.Storage/storageAccounts/queueServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/queueServices/queues | 2025-06-01 |
Microsoft.Storage/storageAccounts/tableServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/tableServices/tables | 2025-06-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/lz/container-appliance:<version>.
Example 1: Active/standby with a switchover
This instance deploys two hosts in activeStandby mode: one data disk attached to the active host, a blob lease so only that host runs the stack, and an internal load balancer whose probe keeps the passive host out of service. After the second deployment (the idempotency pass) a deployment script writes a marker to the data disk, stops the active host’s stack and releases the lease, detaches the disk and attaches it to the standby, and asserts that the standby serves through the load balancer within five minutes with the marker intact. It then fails over from a dead host: it deallocates the host that is active now, so the lease is never released, force-detaches the disk from it and attaches the disk to the other host, and asserts that host takes the lease and serves with the marker intact. Both durations are deployment outputs. The dead host is started again afterwards, so the group is removed with every VM running.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
name: 'ctaprasg001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
dataDiskSizeGB: 32
enableBackup: false
enableKeyVaultPurgeProtection: false
enablePatchSchedule: false
instanceCount: 2
keyVaultName: '<keyVaultName>'
location: '<location>'
payloadPort: 8080
scaleMode: 'activeStandby'
tags: {
Environment: 'Test'
Workload: 'container-appliance'
}
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
}
]
},
"name": {
"value": "ctaprasg001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"dataDiskSizeGB": {
"value": 32
},
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"enablePatchSchedule": {
"value": false
},
"instanceCount": {
"value": 2
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"payloadPort": {
"value": 8080
},
"scaleMode": {
"value": "activeStandby"
},
"tags": {
"value": {
"Environment": "Test",
"Workload": "container-appliance"
}
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
param name = 'ctaprasg001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param dataDiskSizeGB = 32
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param enablePatchSchedule = false
param instanceCount = 2
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param payloadPort = 8080
param scaleMode = 'activeStandby'
param tags = {
Environment: 'Test'
Workload: 'container-appliance'
}
param vnetAddressPrefix = '10.242.0.0/24'
Example 2: Bring your own subnet
This instance deploys the container appliance into an empty subnet that the test creates, in a VNet that also carries a client subnet. The module creates no VNet, NSG or NAT Gateway of its own and asserts that the subnet is empty before it places a host. The second deployment proves the assertion tolerates the appliance’s own hosts. A client VM in the other subnet curls the appliance.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
name: 'ctaprbyo001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
dataDiskSizeGB: 32
enableBackup: false
enableKeyVaultPurgeProtection: false
existingSubnetResourceId: '<existingSubnetResourceId>'
keyVaultName: '<keyVaultName>'
location: '<location>'
tags: {
Environment: 'Test'
Workload: 'container-appliance'
}
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
}
]
},
"name": {
"value": "ctaprbyo001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"dataDiskSizeGB": {
"value": 32
},
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"existingSubnetResourceId": {
"value": "<existingSubnetResourceId>"
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"tags": {
"value": {
"Environment": "Test",
"Workload": "container-appliance"
}
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
param name = 'ctaprbyo001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param dataDiskSizeGB = 32
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param existingSubnetResourceId = '<existingSubnetResourceId>'
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param tags = {
Environment: 'Test'
Workload: 'container-appliance'
}
Example 3: Using only defaults
This instance deploys the container appliance with the minimum set of required parameters. It creates its own VNet, NAT Gateway, managed identity, Key Vault, Recovery Services vault, Log Analytics workspace and a monthly patch schedule, and runs a throwaway compose stack that serves a static page.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
name: 'ctaprmin001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
enableBackup: false
enableKeyVaultPurgeProtection: false
keyVaultName: '<keyVaultName>'
location: '<location>'
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
}
]
},
"name": {
"value": "ctaprmin001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
param name = 'ctaprmin001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param vnetAddressPrefix = '10.242.0.0/24'
Example 4: Load balanced, two hosts
This instance deploys the container appliance in loadBalanced mode: a Flexible scale set of two stateless hosts behind an internal Standard load balancer. A client VM in the same subnet curls the load balancer address and expects the payload.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
name: 'ctaprlb001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
dataDiskSizeGB: 0
enableBackup: false
enableKeyVaultPurgeProtection: false
instanceCount: 2
keyVaultName: '<keyVaultName>'
location: '<location>'
payloadPort: 8080
scaleMode: 'loadBalanced'
tags: {
Environment: 'Test'
Workload: 'container-appliance'
}
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
}
]
},
"name": {
"value": "ctaprlb001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"dataDiskSizeGB": {
"value": 0
},
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"instanceCount": {
"value": 2
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"payloadPort": {
"value": 8080
},
"scaleMode": {
"value": "loadBalanced"
},
"tags": {
"value": {
"Environment": "Test",
"Workload": "container-appliance"
}
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
param name = 'ctaprlb001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param dataDiskSizeGB = 0
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param instanceCount = 2
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param payloadPort = 8080
param scaleMode = 'loadBalanced'
param tags = {
Environment: 'Test'
Workload: 'container-appliance'
}
param vnetAddressPrefix = '10.242.0.0/24'
Example 5: No data disk and a per-rule source
This instance deploys the container appliance for a payload that keeps no state worth restoring: dataDiskSizeGB is 0, so the VM has only its OS disk, and an inbound rule names its own source address prefix instead of using inboundAllowedCidr.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
{
description: 'A second source range for the same port.'
name: 'AllowInboundFromOperatorRange'
port: 8080
protocol: 'Tcp'
sourceAddressPrefix: '172.16.0.0/12'
}
]
name: 'ctaprnod001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
dataDiskSizeGB: 0
enableBackup: false
enableKeyVaultPurgeProtection: false
keyVaultName: '<keyVaultName>'
location: '<location>'
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
},
{
"description": "A second source range for the same port.",
"name": "AllowInboundFromOperatorRange",
"port": 8080,
"protocol": "Tcp",
"sourceAddressPrefix": "172.16.0.0/12"
}
]
},
"name": {
"value": "ctaprnod001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"dataDiskSizeGB": {
"value": 0
},
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
{
description: 'A second source range for the same port.'
name: 'AllowInboundFromOperatorRange'
port: 8080
protocol: 'Tcp'
sourceAddressPrefix: '172.16.0.0/12'
}
]
param name = 'ctaprnod001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param dataDiskSizeGB = 0
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param vnetAddressPrefix = '10.242.0.0/24'
Example 6: Private registry with a Key Vault token
This instance pulls its payload image from a private registry (ghcr.io) by digest, using the keyVaultToken registry mode: a read-only token is stored in the appliance Key Vault, and the agent reads it with the VM identity and logs in only while it pulls. The test supplies the token from the CI Key Vault (secret CI-ghcrReadToken) and fails at validation with the parameter name when it is missing. A client VM curls the payload’s /ping endpoint.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
name: 'ctaprprg001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
containerRegistry: {
mode: 'keyVaultToken'
server: 'ghcr.io'
tokenSecretName: 'registry-token'
}
enableBackup: false
enableKeyVaultPurgeProtection: false
keyVaultName: '<keyVaultName>'
keyVaultSecrets: [
{
contentType: 'Read-only registry token'
name: 'registry-token'
value: '<value>'
}
]
location: '<location>'
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
}
]
},
"name": {
"value": "ctaprprg001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"containerRegistry": {
"value": {
"mode": "keyVaultToken",
"server": "ghcr.io",
"tokenSecretName": "registry-token"
}
},
"enableBackup": {
"value": false
},
"enableKeyVaultPurgeProtection": {
"value": false
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"keyVaultSecrets": {
"value": [
{
"contentType": "Read-only registry token",
"name": "registry-token",
"value": "<value>"
}
]
},
"location": {
"value": "<location>"
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
param name = 'ctaprprg001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param containerRegistry = {
mode: 'keyVaultToken'
server: 'ghcr.io'
tokenSecretName: 'registry-token'
}
param enableBackup = false
param enableKeyVaultPurgeProtection = false
param keyVaultName = '<keyVaultName>'
param keyVaultSecrets = [
{
contentType: 'Read-only registry token'
name: 'registry-token'
value: '<value>'
}
]
param location = '<location>'
param vnetAddressPrefix = '10.242.0.0/24'
Example 7: WAF-aligned
This instance deploys the container appliance in alignment with the best practices of the Azure Well-Architected Framework: CanNotDelete locks on each stateful resource and deliberately NO resource-group lock (a resource-group lock stops Azure Resource Manager grooming deployment history and eventually fails every deployment), a pinned availability zone, an alert email receiver so the alerts reach someone, and a secret delivered to the VM through an env file read from its own Key Vault.
via Bicep module
module containerAppliance 'br/innofactor:avm/ptn/lz/container-appliance:<version>' = {
name: 'containerApplianceDeployment'
params: {
// Required parameters
composeFileContent: '<composeFileContent>'
inboundAllowedCidr: '10.0.0.0/8'
inboundRules: [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
name: 'ctaprxwaf001'
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
vmSize: 'Standard_D2as_v5'
// Non-required parameters
alertEmailAddresses: [
'platform-alerts@example.com'
]
availabilityZone: 1
dataDiskSizeGB: 128
enablePatchSchedule: true
envFiles: [
{
fileName: '.env.web'
variables: [
{
secretName: 'test-secret'
variableName: 'TEST_SECRET'
}
]
}
]
keyVaultName: '<keyVaultName>'
keyVaultSecrets: [
{
contentType: 'Throwaway test value'
name: 'test-secret'
value: '<value>'
}
]
location: '<location>'
protectStatefulResources: true
tags: {
Environment: 'Test'
Workload: 'container-appliance'
}
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"composeFileContent": {
"value": "<composeFileContent>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"inboundRules": {
"value": [
{
"description": "Published network to the web port.",
"name": "AllowInboundToWebPort",
"port": 8080,
"protocol": "Tcp"
}
]
},
"name": {
"value": "ctaprxwaf001"
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
"vmSize": {
"value": "Standard_D2as_v5"
},
// Non-required parameters
"alertEmailAddresses": {
"value": [
"platform-alerts@example.com"
]
},
"availabilityZone": {
"value": 1
},
"dataDiskSizeGB": {
"value": 128
},
"enablePatchSchedule": {
"value": true
},
"envFiles": {
"value": [
{
"fileName": ".env.web",
"variables": [
{
"secretName": "test-secret",
"variableName": "TEST_SECRET"
}
]
}
]
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"keyVaultSecrets": {
"value": [
{
"contentType": "Throwaway test value",
"name": "test-secret",
"value": "<value>"
}
]
},
"location": {
"value": "<location>"
},
"protectStatefulResources": {
"value": true
},
"tags": {
"value": {
"Environment": "Test",
"Workload": "container-appliance"
}
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-appliance:<version>'
// Required parameters
param composeFileContent = '<composeFileContent>'
param inboundAllowedCidr = '10.0.0.0/8'
param inboundRules = [
{
description: 'Published network to the web port.'
name: 'AllowInboundToWebPort'
port: 8080
protocol: 'Tcp'
}
]
param name = 'ctaprxwaf001'
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
param vmSize = 'Standard_D2as_v5'
// Non-required parameters
param alertEmailAddresses = [
'platform-alerts@example.com'
]
param availabilityZone = 1
param dataDiskSizeGB = 128
param enablePatchSchedule = true
param envFiles = [
{
fileName: '.env.web'
variables: [
{
secretName: 'test-secret'
variableName: 'TEST_SECRET'
}
]
}
]
param keyVaultName = '<keyVaultName>'
param keyVaultSecrets = [
{
contentType: 'Throwaway test value'
name: 'test-secret'
value: '<value>'
}
]
param location = '<location>'
param protectStatefulResources = true
param tags = {
Environment: 'Test'
Workload: 'container-appliance'
}
param vnetAddressPrefix = '10.242.0.0/24'
Parameters
Required parameters
| Parameter | Type | Description |
|---|
composeFileContent | string | Full contents of the docker-compose.yml this appliance runs, already rendered by the caller — image tags, environment variables, ports, everything payload-specific. This module only base64-encodes it and writes it to disk idempotently; it does not parse, validate, or know anything about what it contains. Its content is visible in the deployment history, so put no secret in it: use keyVaultSecrets and envFiles. |
inboundAllowedCidr | string | CIDR allowed inbound to the appliance. It is the source of every rule in inboundRules that does not name its own sourceAddressPrefix. |
inboundRules | array | The inbound NSG rules to open, one per published port. Each rule’s source is inboundAllowedCidr unless the rule names its own sourceAddressPrefix. Generic by design — this module does not know what is listening on any of these ports; the workload module supplies the list. Example: [{ name: 'AllowInboundToWebPort', description: '...', port: 4141, protocol: 'Tcp' }]. An explicit deny-all-else rule is always added beneath whatever is listed here, documenting intent above the NSG’s implicit deny. |
name | string | Short name used to derive every resource name in this module (NSG, VNet, VM, Key Vault, etc). Lowercase alphanumeric and hyphens, kept short — several derived names (e.g. the Key Vault) have tight length limits. |
sshPublicKey | string | SSH public key for the admin account. Password authentication is disabled. |
vmSize | string | VM size. Vertical SKU is the only axis this module scales on: one instance is the deliberate architecture, not a limitation. Avoid burstable (B-series) SKUs for any workload with a bursty, CPU-heavy profile: credit exhaustion throttles silently rather than failing loudly. |
Conditional parameters
| Parameter | Type | Description |
|---|
existingIdentityPrincipalId | string | Required if createNewManagedIdentity is false. Principal ID of the existing identity — used only for the manualStepsRequiredForReuse output; no new role is auto-granted to it. |
existingIdentityResourceId | string | Required if createNewManagedIdentity is false. Resource ID of the existing identity to attach. |
vnetAddressPrefix | string | Required if existingSubnetResourceId is empty. Address space for this appliance’s own VNet, created inside this resource group. Must not overlap anything it may later be peered to. This module creates and owns the VNet and subnet rather than joining a caller-supplied one: the bootstrap script needs egress DURING VM provisioning to install Docker and pull container images, so an appliance with no egress at that moment fails to deploy — “join an existing subnet, and hope it has a route to the internet” is not a dependency this module takes on. |
Optional parameters
| Parameter | Type | Description |
|---|
activeInstance | int | activeStandby only: which host (1 or 2) the data disk is attached to when the template is deployed. After a switchover, redeploy with the number of the host that now holds the disk, otherwise the template attaches the disk to the other one. |
additionalSyslogFacilities | array | Extra syslog facilities to collect at EVERY level, Debug included, on top of the system facilities collected at Warning and above. For a payload’s own health records (e.g. local0), which are routinely Info. |
adminUsername | string | Local admin username on the appliance VM. |
alertEmailAddresses | array | Email addresses added to the action group, using the common alert schema. A service desk mailbox (for example a Jira Service Management email channel) turns each notification into a ticket. |
applianceSubnetNewBits | int | Prefix length of the appliance subnet, carved as the first subnet of vnetAddressPrefix with cidrSubnet(vnetAddressPrefix, applianceSubnetNewBits, 0). Despite the name it is a prefix length, not a count of new bits: 27 is a /27 (32 addresses), one VM with headroom for a future second NIC. |
automaticRepairAction | string | loadBalanced only: what Azure does to a host that the Application Health probe reports unhealthy, after automaticRepairGracePeriod.Restart (default): restart the VM. The OS disk, and so anything the payload keeps on it (a mail queue, say), survives.Replace: delete the VM and create a new one. Anything on the OS disk is lost.Reimage: reimage the OS disk. Anything on it is lost.See ADR 19. |
automaticRepairGracePeriod | string | loadBalanced only: how long a new or repaired host may report unhealthy before it is repaired, as an ISO 8601 duration between PT10M and PT90M. |
availabilityZone | int | Availability zone for the VM, its disks and (if created) the NAT Gateway and its public IP. Default 1. A subscription can be barred from a size in some zones and not others — az vm list-skus -l <region> --resource-type virtualMachines shows NotAvailableForSubscription per
zone — so this is a parameter rather than a constant. |
composeDirectoryName | string | Directory name (under /opt/{name}/) the compose file and env files are written to. |
containerRegistry | object | How the hosts authenticate to the container registry that serves the payload images.anonymous (default): no login.managedIdentity: the VM identity logs in. Pass registryResourceId to have this module grant it AcrPull on the registry; otherwise grant it yourself.keyVaultToken: docker login with the secret named tokenSecretName, which must be one of keyVaultSecrets. tokenUsername defaults to the all-zero ACR token user.Personal access tokens are not an accepted credential. See ADR 0010. |
containerRestartAlertThreshold | int | The container-restart alert fires when containers restart more than this many times in 15 minutes. |
createNatGateway | bool | Create a NAT Gateway in this resource group for outbound egress, and associate it to the appliance’s own subnet. Default true. Set false only if this VNet will be connected to a hub that already provides egress — understand that trade before flipping it: a NAT Gateway created but left unassociated is worse than none (it bills, and looks like egress is handled when it is not), and a hub with a secured/forced-tunnelled default route can silently black-hole this appliance’s own outbound traffic if the route table is not scoped correctly. |
createNewManagedIdentity | bool | Default TRUE: create a new user-assigned identity scoped to this appliance, granted only the minimum this module itself needs (its own Key Vault). The customer/operator then grants it write access to whatever the workload is meant to manage, as a separate, their-own decision — this module cannot know that scope and does not attempt to. Set false to attach an EXISTING identity instead (zero RBAC delta against its already-accumulated grants). Attaching an identity from a different subscription than this one is believed to work within a single tenant but is UNPROVEN. |
dataDirectoryName | string | Directory name (under /opt/{name}/) the dedicated data disk is mounted at (or, with dataDiskSizeGB 0, simply created at). The caller’s compose file should bind-mount this path for whatever state its payload needs to survive a VM reimage or redeploy. |
dataDiskSizeGB | int | Size in GB of the dedicated data disk mounted at /opt/{name}/{dataDirectoryName}. Separate from the OS disk so it can be snapshotted, resized and restored independently, and survives an OS reimage. 0 creates no data disk: the directory then lives on the OS disk, for a payload that keeps no state worth restoring. |
defaultRouteNextHopIpAddress | string | Next-hop IP for a 0.0.0.0/0 route on the appliance subnet — a hub firewall or other network virtual appliance. Empty (the default) creates no route table. When set, the subnet egresses through that appliance, so createNatGateway should be false: a user-defined default route to an appliance takes precedence over a NAT Gateway, which would then bill for nothing. The appliance at that address must already permit the bootstrap’s endpoints, because the bootstrap runs during VM provisioning. |
dnsServers | array | Custom DNS servers for the appliance VNet, e.g. a hub firewall DNS proxy. Empty uses Azure-provided DNS. |
drainCommands | array | Shell commands that quiesce the payload before its stack stops on a switchover, a scale-in or a shutdown. They run in the compose directory as root, after the host has left the load balancer pool, and are given up to five minutes. For example flushing a queue, or waiting until no operation is running. |
enableBackup | bool | Back up the VMs with Azure Backup (a Recovery Services vault and a daily policy). Default true, and it should stay true for anything that keeps state. Turn it off only for throwaway deployments such as tests: the vault keeps deleted backup items in soft delete for 14 days and soft delete cannot be switched off on it, so removing a deployment whose VMs were backed up can leave the resource group undeletable for that long. loadBalanced has no VM backup either way. |
enableKeyVaultPurgeProtection | bool | Purge protection on the Key Vault. Default true, which is the WAF recommendation and what production should use. Turn it off only for throwaway deployments (tests): a purge-protected vault cannot be purged after it is deleted, so its name stays reserved for the retention period. |
enablePatchSchedule | bool | Attach the VM to the patch window above. False leaves patching to Azure, at times Azure chooses. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
envFiles | array | Env files to materialise on the host from the secrets above, before the compose stack starts. Each entry names a file (written under composeDirectoryName) and a list of VAR_NAME= lines to populate from named Key Vault secrets. Secret retrieval only — noaz CLI on the box, umask 177 before any file is created, each file chmod 600 immediately after. |
existingSubnetResourceId | string | Resource ID of an existing subnet to place the appliance in, instead of creating a VNet, NSG, NAT Gateway and route table. The subnet must be dedicated and empty: the deployment fails with “appliance requires a dedicated empty subnet” when anything other than this appliance’s own hosts and load balancer sits in it. The module changes nothing about that subnet, so it is the caller’s to provide: egress to the Docker and Ubuntu repositories and the container registry during provisioning, the Microsoft.KeyVault service endpoint (and Microsoft.Storage for activeStandby), and an NSG that allows the inbound ports and, for the load-balanced modes, the AzureLoadBalancer probe. inboundRules, inboundAllowedCidr, createNatGateway, defaultRouteNextHopIpAddress, dnsServers and virtualNetworkPeerings then have no effect. |
hostPrivateIpAddress | string | Static private IP address for the first appliance VM (single and activeStandby), inside the appliance subnet. Empty uses cidrHost(the appliance subnet, 4), the first usable address, for a subnet this module creates, and a dynamic address in a subnet the caller brings. The second activeStandby host takes the next address. Not used by loadBalanced, whose hosts are dynamic: callers use applianceAddress. |
instanceCount | int | Number of hosts. single: 1. activeStandby: 2. loadBalanced: 1 or more. Every host takes an address in the appliance subnet, so a large loadBalanced count needs a bigger subnet: lower applianceSubnetNewBits (a /27 holds about 26 hosts). |
itsmWebhookUri | string | ITSM webhook URI for the action group. |
keyVaultName | string | Name of this module’s Key Vault. Empty (the default) derives a deterministic name from name and the resource group. Set it when the derived name is taken, for example by a vault that was deleted with purge protection on and so cannot be purged: a purge-protected vault keeps its name for the whole retention period (90 days). |
keyVaultSecrets | array | Secrets to store in this module’s own Key Vault. Generic name/value/contentType triples — this module does not know or care what any of them are for. |
location | string | Location for all Resources. |
lock | object | A lock to apply to the whole resource group. NOT recommended: a CanNotDelete lock on the group stops Azure Resource Manager grooming deployment history and eventually fails every deployment into it. Leave unset and use protectStatefulResources instead. |
maintenanceWindow | object | Monthly in-guest patch window for the VM (Azure Update Manager). Installs Linux Critical and Security updates and reboots only if required. Null (the default) uses 1Month Third Tuesday Offset3, 22:00 FLE: the Friday after the third Tuesday of the month (ten days after Patch Tuesday). It is a dedicated schedule on purpose: check that any estate-wide schedule you might attach the VM to actually includes the Linux Critical and Security classifications — some include only “Other”, so a Linux VM attached to them is never security-patched. Used only when enablePatchSchedule is true. |
payloadPort | int | TCP port the internal load balancer probes and forwards. Required for activeStandby and loadBalanced; the passive activeStandby host never listens on it, which is what keeps it out of service. |
postComposeCommands | array | Extra shell commands run after docker compose up -d (e.g. a one-off payload-specific bootstrap action). Empty by default. |
preComposeCommands | array | Extra shell commands run before the compose file is written (e.g. installing an extra apt package one specific payload needs). Empty by default — most payloads need nothing here; treat a long list here as a signal the module’s interface is missing a first-class parameter. |
protectStatefulResources | bool | Put a CanNotDelete lock on each resource that holds state: the VM, its OS and data disks, the Key Vault, the Recovery Services vault and the Log Analytics workspace this module creates. Resource-level on purpose. A CanNotDelete lock on the resource GROUP also stops Azure Resource Manager deleting the group’s old deployment records, so the group walks to the 800-deployment ceiling and every deployment into it fails. Locks on the resources protect the same data without blocking that. |
roleAssignments | array | Additional role assignments to grant on this resource group, beyond the identity grants this module manages itself via createNewManagedIdentity. |
scaleMode | string | How many hosts there are and what happens when one fails. The mode decides the update and failover rule, not just the host count.single (default): one VM. State lives on its data disk; restore from backup. No load balancer. applianceAddress is the VM.activeStandby: two VMs in one zone, ONE data disk attached to the active host, a blob lease so only the host holding it runs the stack, and an internal load balancer whose probe on payloadPort keeps the passive host (stack stopped) out of service. Switchover is a control-plane operation: stop and release on the active host, detach and attach the disk, and the standby takes over. See ADR 0009 and ADR 0011.loadBalanced: a Flexible-orchestration scale set of instanceCount stateless hosts behind an internal load balancer. No data disk and no VM backup. Hosts are patched by Azure’s automatic guest patching (Critical and Security, in batches, availability first) on the platform’s schedule, so enablePatchSchedule and maintenanceWindow do not apply. |
scaleSetZones | array | loadBalanced only: availability zones the scale set spreads across, for example [1, 2, 3]. Empty uses availabilityZone alone. A subscription can be barred from a size in some zones, so spread is opt-in. |
tags | object | Tags applied to every resource this module creates. |
virtualNetworkPeerings | array | VNet peerings, in the AVM virtual-network peerings shape. Empty (thedefault) peers nothing. A peering with remotePeeringEnabled also writes the remote side, which is a write OUTSIDE this resource group — the one deliberate exception to this module owning only its own group, and opt-in for exactly that reason. It needs peer rights on the remote VNet, and a Managed Application deployment cannot use it. |
workspaceResourceId | string | Resource ID of an existing Log Analytics Workspace. If not provided, a new one is created in this resource group — self-contained. |
Parameter: composeFileContent
Full contents of the docker-compose.yml this appliance runs, already
rendered by the caller — image tags, environment variables, ports, everything payload-specific.
This module only base64-encodes it and writes it to disk idempotently; it does not parse, validate,
or know anything about what it contains. Its content is visible in the deployment history, so put no
secret in it: use keyVaultSecrets and envFiles.
- Required: Yes
- Type: string
Parameter: inboundAllowedCidr
CIDR allowed inbound to the appliance. It is the source of every rule in inboundRules that does not name its own sourceAddressPrefix.
- Required: Yes
- Type: string
Parameter: inboundRules
The inbound NSG rules to open, one per published port. Each rule’s source is
inboundAllowedCidr unless the rule names its own sourceAddressPrefix. Generic by design — this module
does not know what is listening on any of these ports; the workload module supplies the list.
Example: [{ name: 'AllowInboundToWebPort', description: '...', port: 4141, protocol: 'Tcp' }].
An explicit deny-all-else rule is always added beneath whatever is listed here, documenting intent
above the NSG’s implicit deny.
Required parameters
| Parameter | Type | Description |
|---|
description | string | NSG rule description. At most 140 characters — ARM rejects longer ones at deploy time, not compile time, without this. |
name | string | NSG rule name. |
port | int | Destination port to allow. |
protocol | string | Protocol, e.g. Tcp. |
Optional parameters
| Parameter | Type | Description |
|---|
sourceAddressPrefix | string | Source address prefix for this rule. Defaults to inboundAllowedCidr. |
Parameter: inboundRules.description
NSG rule description. At most 140 characters — ARM rejects longer ones at deploy time, not compile time, without this.
- Required: Yes
- Type: string
Parameter: inboundRules.name
NSG rule name.
- Required: Yes
- Type: string
Parameter: inboundRules.port
Destination port to allow.
Parameter: inboundRules.protocol
Protocol, e.g. Tcp.
- Required: Yes
- Type: string
Parameter: inboundRules.sourceAddressPrefix
Source address prefix for this rule. Defaults to inboundAllowedCidr.
Parameter: name
Short name used to derive every resource name in this module (NSG, VNet, VM, Key Vault, etc). Lowercase alphanumeric and hyphens, kept short — several derived names (e.g. the Key Vault) have tight length limits.
- Required: Yes
- Type: string
Parameter: sshPublicKey
SSH public key for the admin account. Password authentication is disabled.
- Required: Yes
- Type: string
Parameter: vmSize
VM size. Vertical SKU is the only axis this module scales on: one instance is
the deliberate architecture, not a limitation. Avoid burstable (B-series) SKUs for any workload with
a bursty, CPU-heavy profile: credit exhaustion throttles silently rather than failing loudly.
- Required: Yes
- Type: string
Parameter: existingIdentityPrincipalId
Required if createNewManagedIdentity is false. Principal ID of the existing identity — used only for the manualStepsRequiredForReuse output; no new role is auto-granted to it.
- Required: No
- Type: string
- Default:
''
Parameter: existingIdentityResourceId
Required if createNewManagedIdentity is false. Resource ID of the existing identity to attach.
- Required: No
- Type: string
- Default:
''
Parameter: vnetAddressPrefix
Required if existingSubnetResourceId is empty. Address space for this appliance’s own VNet, created inside this resource
group. Must not overlap anything it may later be peered to. This module creates and owns the VNet
and subnet rather than joining a caller-supplied one: the bootstrap script needs egress DURING VM
provisioning to install Docker and pull container images, so an appliance with no egress at that
moment fails to deploy — “join an existing subnet, and hope it has a route to the internet” is not
a dependency this module takes on.
- Required: No
- Type: string
- Default:
''
Parameter: activeInstance
activeStandby only: which host (1 or 2) the data disk is attached to when the template is deployed. After a switchover, redeploy with the number of the host that now holds the disk, otherwise the template attaches the disk to the other one.
- Required: No
- Type: int
- Default:
1 - Allowed:
Parameter: additionalSyslogFacilities
Extra syslog facilities to collect at EVERY level, Debug included, on top of the system facilities collected at Warning and above. For a payload’s own health records (e.g. local0), which are routinely Info.
- Required: No
- Type: array
- Default:
[]
Parameter: adminUsername
Local admin username on the appliance VM.
- Required: No
- Type: string
- Default:
'applianceadmin'
Parameter: alertEmailAddresses
Email addresses added to the action group, using the common alert schema. A service desk mailbox (for example a Jira Service Management email channel) turns each notification into a ticket.
- Required: No
- Type: array
- Default:
[]
Parameter: applianceSubnetNewBits
Prefix length of the appliance subnet, carved as the first subnet of vnetAddressPrefix with cidrSubnet(vnetAddressPrefix, applianceSubnetNewBits, 0). Despite the name it is a prefix length, not a count of new bits: 27 is a /27 (32 addresses), one VM with headroom for a future second NIC.
- Required: No
- Type: int
- Default:
27
Parameter: automaticRepairAction
loadBalanced only: what Azure does to a host that the Application Health probe reports unhealthy, after automaticRepairGracePeriod.
Restart (default): restart the VM. The OS disk, and so anything the payload keeps on it (a mail queue, say), survives.Replace: delete the VM and create a new one. Anything on the OS disk is lost.Reimage: reimage the OS disk. Anything on it is lost.See ADR 19.
- Required: No
- Type: string
- Default:
'Restart' - Allowed:
[
'Reimage'
'Replace'
'Restart'
]
Parameter: automaticRepairGracePeriod
loadBalanced only: how long a new or repaired host may report unhealthy before it is repaired, as an ISO 8601 duration between PT10M and PT90M.
- Required: No
- Type: string
- Default:
'PT30M'
Parameter: availabilityZone
Availability zone for the VM, its disks and (if created) the NAT Gateway and
its public IP. Default 1. A subscription can be barred from a size in some zones and not others —
az vm list-skus -l <region> --resource-type virtualMachines shows NotAvailableForSubscription per
zone — so this is a parameter rather than a constant.
- Required: No
- Type: int
- Default:
1 - Allowed:
Parameter: composeDirectoryName
Directory name (under /opt/{name}/) the compose file and env files are written to.
- Required: No
- Type: string
- Default:
'compose'
Parameter: containerRegistry
How the hosts authenticate to the container registry that serves the payload images.
anonymous (default): no login.managedIdentity: the VM identity logs in. Pass registryResourceId to have this module grant it AcrPull on the registry; otherwise grant it yourself.keyVaultToken: docker login with the secret named tokenSecretName, which must be one of keyVaultSecrets. tokenUsername defaults to the all-zero ACR token user.Personal access tokens are not an accepted credential. See ADR 0010.
- Required: No
- Type: object
- Default:
{
mode: 'anonymous'
server: ''
}
Required parameters
| Parameter | Type | Description |
|---|
mode | string | How to authenticate: anonymous, managedIdentity or keyVaultToken. |
server | string | Registry server name, for example contoso.azurecr.io. Empty with mode anonymous. |
Conditional parameters
| Parameter | Type | Description |
|---|
tokenSecretName | string | Required if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token. |
Optional parameters
| Parameter | Type | Description |
|---|
registryResourceId | string | managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it. |
tokenUsername | string | keyVaultToken only: the user name that goes with the token. |
Parameter: containerRegistry.mode
How to authenticate: anonymous, managedIdentity or keyVaultToken.
- Required: Yes
- Type: string
- Allowed:
[
'anonymous'
'keyVaultToken'
'managedIdentity'
]
Parameter: containerRegistry.server
Registry server name, for example contoso.azurecr.io. Empty with mode anonymous.
- Required: Yes
- Type: string
Parameter: containerRegistry.tokenSecretName
Required if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token.
Parameter: containerRegistry.registryResourceId
managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.
Parameter: containerRegistry.tokenUsername
keyVaultToken only: the user name that goes with the token.
Parameter: containerRestartAlertThreshold
The container-restart alert fires when containers restart more than this many times in 15 minutes.
- Required: No
- Type: int
- Default:
3 - MinValue: 1
Parameter: createNatGateway
Create a NAT Gateway in this resource group for outbound egress, and
associate it to the appliance’s own subnet. Default true. Set false only if this VNet will be
connected to a hub that already provides egress — understand that trade before flipping it: a NAT
Gateway created but left unassociated is worse than none (it bills, and looks like egress is
handled when it is not), and a hub with a secured/forced-tunnelled default route can silently
black-hole this appliance’s own outbound traffic if the route table is not scoped correctly.
- Required: No
- Type: bool
- Default:
True - MinValue: 1
Parameter: createNewManagedIdentity
Default TRUE: create a new user-assigned identity scoped to this
appliance, granted only the minimum this module itself needs (its own Key Vault). The
customer/operator then grants it write access to whatever the workload is meant to manage, as a
separate, their-own decision — this module cannot know that scope and does not attempt to.
Set false to attach an EXISTING identity instead (zero RBAC delta against its already-accumulated
grants). Attaching an identity from a different subscription than this one is believed to work
within a single tenant but is UNPROVEN.
- Required: No
- Type: bool
- Default:
True - MinValue: 1
Parameter: dataDirectoryName
Directory name (under /opt/{name}/) the dedicated data disk is mounted at (or, with dataDiskSizeGB 0, simply created at). The caller’s compose file should bind-mount this path for whatever state its payload needs to survive a VM reimage or redeploy.
- Required: No
- Type: string
- Default:
'data' - MinValue: 1
Parameter: dataDiskSizeGB
Size in GB of the dedicated data disk mounted at /opt/{name}/{dataDirectoryName}. Separate from the OS disk so it can be snapshotted, resized and restored independently, and survives an OS reimage. 0 creates no data disk: the directory then lives on the OS disk, for a payload that keeps no state worth restoring.
- Required: No
- Type: int
- Default:
128 - MinValue: 0
Parameter: defaultRouteNextHopIpAddress
Next-hop IP for a 0.0.0.0/0 route on the appliance subnet — a hub firewall
or other network virtual appliance. Empty (the default) creates no route table. When set, the
subnet egresses through that appliance, so createNatGateway should be false: a user-defined
default route to an appliance takes precedence over a NAT Gateway, which would then bill for
nothing. The appliance at that address must already permit the bootstrap’s endpoints, because
the bootstrap runs during VM provisioning.
- Required: No
- Type: string
- Default:
'' - MinValue: 0
Parameter: dnsServers
Custom DNS servers for the appliance VNet, e.g. a hub firewall DNS proxy. Empty uses Azure-provided DNS.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
Parameter: drainCommands
Shell commands that quiesce the payload before its stack stops on a switchover, a scale-in or a shutdown. They run in the compose directory as root, after the host has left the load balancer pool, and are given up to five minutes. For example flushing a queue, or waiting until no operation is running.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
Parameter: enableBackup
Back up the VMs with Azure Backup (a Recovery Services vault and a daily policy). Default true, and it should stay true for anything that keeps state. Turn it off only for throwaway deployments such as tests: the vault keeps deleted backup items in soft delete for 14 days and soft delete cannot be switched off on it, so removing a deployment whose VMs were backed up can leave the resource group undeletable for that long. loadBalanced has no VM backup either way.
- Required: No
- Type: bool
- Default:
True - MinValue: 0
Parameter: enableKeyVaultPurgeProtection
Purge protection on the Key Vault. Default true, which is the WAF recommendation and what production should use. Turn it off only for throwaway deployments (tests): a purge-protected vault cannot be purged after it is deleted, so its name stays reserved for the retention period.
- Required: No
- Type: bool
- Default:
True - MinValue: 0
Parameter: enablePatchSchedule
Attach the VM to the patch window above. False leaves patching to Azure, at times Azure chooses.
- Required: No
- Type: bool
- Default:
True - MinValue: 0
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True - MinValue: 0
Parameter: envFiles
Env files to materialise on the host from the secrets above, before the
compose stack starts. Each entry names a file (written under composeDirectoryName) and a list of
VAR_NAME= lines to populate from named Key Vault secrets. Secret retrieval only — noaz CLI on the box, umask 177 before any file is created, each file chmod 600 immediately after.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
Required parameters
| Parameter | Type | Description |
|---|
fileName | string | File name, written under composeDirectoryName. Must start with .env: the bootstrap hashes .env* to detect a rotated secret. |
variables | array | Variables to write into this file. |
Parameter: envFiles.fileName
File name, written under composeDirectoryName. Must start with .env: the bootstrap hashes .env* to detect a rotated secret.
- Required: Yes
- Type: string
- MinValue: 0
Parameter: envFiles.variables
Variables to write into this file.
- Required: Yes
- Type: array
- MinValue: 0
Required parameters
| Parameter | Type | Description |
|---|
secretName | string | Name of the Key Vault secret (must be present in keyVaultSecrets) whose value is written as this variable. |
variableName | string | Environment variable name written into the file. |
Parameter: envFiles.variables.secretName
Name of the Key Vault secret (must be present in keyVaultSecrets) whose value is written as this variable.
- Required: Yes
- Type: string
- MinValue: 0
Parameter: envFiles.variables.variableName
Environment variable name written into the file.
- Required: Yes
- Type: string
- MinValue: 0
Parameter: existingSubnetResourceId
Resource ID of an existing subnet to place the appliance in, instead of creating a VNet, NSG,
NAT Gateway and route table. The subnet must be dedicated and empty: the deployment fails with “appliance requires a
dedicated empty subnet” when anything other than this appliance’s own hosts and load balancer sits in it. The
module changes nothing about that subnet, so it is the caller’s to provide: egress to the Docker and Ubuntu
repositories and the container registry during provisioning, the Microsoft.KeyVault service endpoint (and
Microsoft.Storage for activeStandby), and an NSG that allows the inbound ports and, for the load-balanced modes,
the AzureLoadBalancer probe. inboundRules, inboundAllowedCidr, createNatGateway, defaultRouteNextHopIpAddress,
dnsServers and virtualNetworkPeerings then have no effect.
- Required: No
- Type: string
- Default:
'' - MinValue: 0
Parameter: hostPrivateIpAddress
Static private IP address for the first appliance VM (single and activeStandby), inside the appliance subnet. Empty uses cidrHost(the appliance subnet, 4), the first usable address, for a subnet this module creates, and a dynamic address in a subnet the caller brings. The second activeStandby host takes the next address. Not used by loadBalanced, whose hosts are dynamic: callers use applianceAddress.
- Required: No
- Type: string
- Default:
'' - MinValue: 0
Parameter: instanceCount
Number of hosts. single: 1. activeStandby: 2. loadBalanced: 1 or more. Every host takes an address in the appliance subnet, so a large loadBalanced count needs a bigger subnet: lower applianceSubnetNewBits (a /27 holds about 26 hosts).
- Required: No
- Type: int
- Default:
1 - MinValue: 1
- MaxValue: 100
Parameter: itsmWebhookUri
ITSM webhook URI for the action group.
- Required: No
- Type: string
- Default:
'' - MinValue: 1
- MaxValue: 100
Parameter: keyVaultName
Name of this module’s Key Vault. Empty (the default) derives a deterministic name from name and the resource group. Set it when the derived name is taken, for example by a vault that was deleted with purge protection on and so cannot be purged: a purge-protected vault keeps its name for the whole retention period (90 days).
- Required: No
- Type: string
- Default:
'' - MinValue: 1
- MaxValue: 100
Parameter: keyVaultSecrets
Secrets to store in this module’s own Key Vault. Generic name/value/contentType
triples — this module does not know or care what any of them are for.
- Required: No
- Type: array
- Default:
[] - MinValue: 1
- MaxValue: 100
Required parameters
| Parameter | Type | Description |
|---|
name | string | Secret name in Key Vault. |
value | securestring | Secret value. |
Optional parameters
| Parameter | Type | Description |
|---|
contentType | string | Content type / description shown on the secret. |
Parameter: keyVaultSecrets.name
Secret name in Key Vault.
- Required: Yes
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: keyVaultSecrets.value
Secret value.
- Required: Yes
- Type: securestring
- MinValue: 1
- MaxValue: 100
Parameter: keyVaultSecrets.contentType
Content type / description shown on the secret.
- Required: No
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[resourceGroup().location] - MinValue: 1
- MaxValue: 100
Parameter: lock
A lock to apply to the whole resource group. NOT recommended: a CanNotDelete lock on the group stops Azure Resource Manager grooming deployment history and eventually fails every deployment into it. Leave unset and use protectStatefulResources instead.
- Required: No
- Type: object
- MinValue: 1
- MaxValue: 100
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | The lock kind. |
name | string | Name of the lock. |
notes | string | Notes about this lock. |
Parameter: lock.kind
The lock kind.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
- MinValue: 1
- MaxValue: 100
Parameter: lock.name
Name of the lock.
- Required: No
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: lock.notes
Notes about this lock.
- Required: No
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: maintenanceWindow
Monthly in-guest patch window for the VM (Azure Update Manager). Installs Linux
Critical and Security updates and reboots only if required. Null (the default) uses 1Month Third Tuesday Offset3, 22:00 FLE: the
Friday after the third Tuesday of the month (ten days after Patch Tuesday). It is a dedicated schedule on purpose: check that any estate-wide schedule you
might attach the VM to actually includes the Linux Critical and Security classifications — some
include only “Other”, so a Linux VM attached to them is never security-patched. Used only when enablePatchSchedule is true.
- Required: No
- Type: object
- MinValue: 1
- MaxValue: 100
Parameter: payloadPort
TCP port the internal load balancer probes and forwards. Required for activeStandby and loadBalanced; the passive activeStandby host never listens on it, which is what keeps it out of service.
- Required: No
- Type: int
- Default:
0 - MinValue: 0
- MaxValue: 65535
Parameter: postComposeCommands
Extra shell commands run after docker compose up -d (e.g. a one-off payload-specific bootstrap action). Empty by default.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
- MaxValue: 65535
Parameter: preComposeCommands
Extra shell commands run before the compose file is written (e.g. installing an extra apt package one specific payload needs). Empty by default — most payloads need nothing here; treat a long list here as a signal the module’s interface is missing a first-class parameter.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
- MaxValue: 65535
Parameter: protectStatefulResources
Put a CanNotDelete lock on each resource that holds state: the VM, its OS and data
disks, the Key Vault, the Recovery Services vault and the Log Analytics workspace this module creates.
Resource-level on purpose. A CanNotDelete lock on the resource GROUP also stops Azure Resource Manager
deleting the group’s old deployment records, so the group walks to the 800-deployment ceiling and
every deployment into it fails. Locks on the resources protect the same data without blocking that.
- Required: No
- Type: bool
- Default:
True - MinValue: 0
- MaxValue: 65535
Parameter: roleAssignments
Additional role assignments to grant on this resource group, beyond the identity grants this module manages itself via createNewManagedIdentity.
- Required: No
- Type: array
- MinValue: 0
- MaxValue: 65535
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the user, group, or service principal to assign the role to. |
roleDefinitionIdOrName | string | The role to assign — either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription). |
Optional parameters
| Parameter | Type | Description |
|---|
principalType | string | The principal type of the assigned principal ID. |
Parameter: roleAssignments.principalId
The principal ID of the user, group, or service principal to assign the role to.
- Required: Yes
- Type: string
- MinValue: 0
- MaxValue: 65535
Parameter: roleAssignments.roleDefinitionIdOrName
The role to assign — either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription).
- Required: Yes
- Type: string
- MinValue: 0
- MaxValue: 65535
Parameter: roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
- MinValue: 0
- MaxValue: 65535
Parameter: scaleMode
How many hosts there are and what happens when one fails. The mode decides the update and failover rule, not just the host count.
single (default): one VM. State lives on its data disk; restore from backup. No load balancer. applianceAddress is the VM.activeStandby: two VMs in one zone, ONE data disk attached to the active host, a blob lease so only the host holding it runs the stack, and an internal load balancer whose probe on payloadPort keeps the passive host (stack stopped) out of service. Switchover is a control-plane operation: stop and release on the active host, detach and attach the disk, and the standby takes over. See ADR 0009 and ADR 0011.loadBalanced: a Flexible-orchestration scale set of instanceCount stateless hosts behind an internal load balancer. No data disk and no VM backup. Hosts are patched by Azure’s automatic guest patching (Critical and Security, in batches, availability first) on the platform’s schedule, so enablePatchSchedule and maintenanceWindow do not apply.
- Required: No
- Type: string
- Default:
'single' - Allowed:
[
'activeStandby'
'loadBalanced'
'single'
]
- MinValue: 0
- MaxValue: 65535
Parameter: scaleSetZones
loadBalanced only: availability zones the scale set spreads across, for example [1, 2, 3]. Empty uses availabilityZone alone. A subscription can be barred from a size in some zones, so spread is opt-in.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
- MaxValue: 65535
Tags applied to every resource this module creates.
- Required: No
- Type: object
- MinValue: 0
- MaxValue: 65535
Parameter: virtualNetworkPeerings
VNet peerings, in the AVM virtual-network peerings shape. Empty (the
default) peers nothing. A peering with remotePeeringEnabled also writes the remote side, which is
a write OUTSIDE this resource group — the one deliberate exception to this module owning only its
own group, and opt-in for exactly that reason. It needs peer rights on the remote VNet, and a
Managed Application deployment cannot use it.
- Required: No
- Type: array
- Default:
[] - MinValue: 0
- MaxValue: 65535
Parameter: workspaceResourceId
Resource ID of an existing Log Analytics Workspace. If not provided, a new one is created in this resource group — self-contained.
- Required: No
- Type: string
- Default:
'' - MinValue: 0
- MaxValue: 65535
Outputs
| Output | Type | Description |
|---|
actionGroupResourceId | string | Resource ID of the appliance action group — a workload module adds its own alerts to it. |
applianceAddress | string | The address callers route to: the VM itself for single, the internal load balancer frontend for activeStandby and loadBalanced. |
applianceHostNames | array | Names of the appliance VMs, in host order. Empty for loadBalanced. |
applianceHostResourceIds | array | Resource IDs of the appliance VMs: one for single, two for activeStandby (in host order), empty for loadBalanced. |
applianceSubnetResourceId | string | Resource ID of the appliance subnet — pass this to a workload module that needs to scope its own resources’ network ACLs to the same subnet. |
applianceVmPrivateIpAddress | string | Deprecated alias for applianceAddress, kept so existing consumers compile. Use applianceAddress. |
applianceVmResourceId | string | Resource ID of the first appliance VM, or of the scale set in loadBalanced mode. |
dataDiskName | string | Name of the data disk. Empty when there is none. |
keyVaultName | string | Name of this module’s Key Vault. |
keyVaultUri | string | URI of this module’s Key Vault — pass this to a workload module that needs to reference the same vault. |
leaseStorageAccountName | string | Name of the storage account that holds the active/standby lease. Empty unless activeStandby. |
loadBalancerResourceId | string | Resource ID of the internal load balancer. Empty for single. |
manualStepsRequiredForReuse | array | Empty when createNewManagedIdentity is true (the grant is applied automatically). When reusing an existing identity, this is the one manual role assignment this module itself still needs before the appliance can operate. A workload module appends its own manual steps (if any) to this list. |
resourceGroupName | string | The name of the resource group the appliance was deployed into. |
scaleSetResourceId | string | Resource ID of the scale set. Empty unless loadBalanced. |
virtualNetworkResourceId | string | Resource ID of the VNet this module created. Empty when existingSubnetResourceId is set. |
vmIdentityPrincipalId | string | Principal ID of the VM’s managed identity (new or reused) — a workload module grants this principal whatever additional roles its own resources need. |
vmIdentityResourceId | string | Resource ID of the VM’s managed identity (new or reused). |
workspaceResourceId | string | Resource ID of the Log Analytics Workspace in use (new or provided) — a workload module can add its own data collection or alerts against the same workspace. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/public:avm/res/compute/virtual-machine:0.15.0 | Remote reference |
br/public:avm/res/insights/action-group:0.7.0 | Remote reference |
br/public:avm/res/insights/data-collection-rule:0.6.1 | Remote reference |
br/public:avm/res/insights/metric-alert:0.4.0 | Remote reference |
br/public:avm/res/insights/scheduled-query-rule:0.5.1 | Remote reference |
br/public:avm/res/key-vault/vault:0.14.0 | Remote reference |
br/public:avm/res/managed-identity/user-assigned-identity:0.4.1 | Remote reference |
br/public:avm/res/network/nat-gateway:1.1.0 | Remote reference |
br/public:avm/res/network/network-security-group:0.5.1 | Remote reference |
br/public:avm/res/network/public-ip-address:0.6.0 | Remote reference |
br/public:avm/res/network/virtual-network:0.7.0 | Remote reference |
br/public:avm/res/operational-insights/workspace:0.12.0 | Remote reference |
br/public:avm/res/recovery-services/vault:0.7.0 | Remote reference |
br/public:avm/res/storage/storage-account:0.33.1 | Remote reference |
Notes
What this module is, and is not
Ubuntu hosts running Docker, each started with ONE Docker Compose stack that the caller supplies, plus everything every such appliance needs around it: network, runtime secret store, backup, monitoring, alerting and patching. How many hosts there are, and what happens when one fails, is the scaleMode (see “Scale modes” below). The default, single, is one VM: availability is a restore-time strategy (backup, redeploy), not redundancy, and the way to scale it is vertically through vmSize.
It is the infrastructure layer of a two-module pattern. A workload module consumes it, supplies the payload and adds whatever only that payload needs. The rule for what goes where:
- Anything every payload needs lives here: VNet and subnet, NSG, NAT Gateway, VM and disks, identity, the Key Vault the VM reads its secrets from, backup, Log Analytics, generic alerts, the patch window.
- Anything only one payload needs lives in that payload’s module: its storage, its application alerts and probes, its compose file, its configuration, its network publishing.
The module is scoped to a resource group (targetScope = 'resourceGroup'), so the caller creates the group and a workload module can place its own resources in the same one.
The payload contract
The module accepts an already-rendered payload and never parses it:
| Parameter | What the caller supplies |
|---|
composeFileContent | The full text of docker-compose.yml. Written to /opt/<name>/<composeDirectoryName>/docker-compose.yml on every run, in one decode, so a redeploy replaces it whole. |
keyVaultSecrets | Name, value and content type of each secret to store in this module’s Key Vault. |
envFiles | Env files to build on the host before the stack starts. Each names a file and a list of VARIABLE to Key Vault secret name pairs. The VM reads each secret with its managed identity; no az CLI is installed, files are created with umask 177 and chmod 600. |
inboundRules | One NSG allow rule per published port. A deny-all-else rule is always added beneath them. |
preComposeCommands, postComposeCommands | Extra shell lines before the compose file is written, or after docker compose up -d. A long list here means the interface is missing a first-class parameter. |
additionalSyslogFacilities | Syslog facilities, such as local0, collected at every level so a payload’s own health records reach Log Analytics. |
Compose recreates a container only when its definition changes, never when the content of an env_file changes. The bootstrap therefore hashes the env files before and after rewriting them and runs docker compose up -d --force-recreate when they differ, so a rotated secret takes effect.
Rotating a secret takes a redeploy. The Custom Script extension only runs again when its settings change, and no secret value is in the script, so the script carries a hash of keyVaultSecrets (not the secrets): a changed secret changes the script, the next deployment rewrites the env files and the containers are recreated. Env file names must start with .env, and secret values must be single-line (a newline breaks the file, and a $ in a value has not been tested against Compose interpolation).
The bootstrap fails loudly where it can. It stops with a non-zero exit, which fails the VM deployment, when Docker is not installed, when a Key Vault secret named in envFiles cannot be read, or when docker compose up fails. It does not use set -e, so a failure in a preComposeCommands or postComposeCommands line does not stop it unless that line exits explicitly. For a reused identity (createNewManagedIdentity = false), grant Key Vault Secrets User on the vault before the first deployment: a deployment that cannot read its secrets now fails instead of starting containers with empty credentials.
The bootstrap script runs as a Custom Script extension during VM provisioning. It needs outbound access to download.docker.com, the Ubuntu archive and whatever registries the compose file pulls from, so the appliance must have egress when the VM is created.
Scale modes
scaleMode | Hosts | State | Failover |
|---|
single (default) | One VM. instanceCount is 1. | One data disk. | Restore from backup. No load balancer; applianceAddress is the VM. |
activeStandby | Two VMs in one zone. instanceCount is 2. | One data disk, attached to the active host (activeInstance) only. | A blob lease keeps a single writer. An internal Standard load balancer probes TCP payloadPort, so the passive host, whose stack is stopped, receives nothing. Switchover is a control-plane operation, see below. |
loadBalanced | A Flexible scale set of instanceCount hosts, spread over scaleSetZones. | None. No data disk, no VM backup. | The internal load balancer drops a host that fails the probe. Scale-in drains the stack first. |
Patching in loadBalanced. Hosts are patched automatically by Azure (Critical and Security, in availability-first batches, gated on the Application Health check of payloadPort) at all hours, with no patch window, by design; enablePatchSchedule and maintenanceWindow apply to the VM modes only.
Both load-balanced modes need payloadPort. Callers route to the applianceAddress output, never to a host. Hosts are named <name>-host01, <name>-host02, … (the applianceHostNames output).
Switchover (activeStandby). The agent on each host only takes the lease, mounts the data disk, starts the stack, drains and releases. Moving the disk is an Azure Resource Manager operation that the control plane runs with its own identity, so no host has any right over its sibling:
- On the active host:
sudo /usr/local/sbin/appliance-agent.sh release. This drains the stack (drainCommands), stops it, unmounts the data disk and releases the lease, and keeps the host passive. - Detach the data disk (
dataDiskName output) from the active host. - Attach it to the standby at LUN 0.
The standby’s agent sees the disk, takes the lease, mounts it and starts the stack, and the load balancer probe then admits it. If the active host cannot answer, skip step 1, wait out the 60-second lease and force-detach. After a switchover redeploy with activeInstance set to the host that now holds the disk, or the template attaches the disk to the other host. The e2e test active-standby proves both paths: the planned switchover above, and a failover from a dead host (the active VM is deallocated, so nothing releases the lease; the disk is force-detached and attached to the other host, which takes the lease once it has expired and serves). A standby that cannot take the lease, because the dead host still holds it, simply stays passive and retries every few seconds until the lease expires; that case is not tested. Both hosts are in one availability zone, because a managed disk is zonal, so a zone outage takes down both. See ADR 11.
Testing note. A failed removal of a resource group that holds a Recovery Services vault with backup items can block that group, and so its name, for 14 days: the vault keeps the items in soft delete, which cannot be disabled on a vault created with enhanced security. A test that has to be re-run after such a failure takes a new serviceShort.
Container registry authentication
containerRegistry.mode is anonymous (default), managedIdentity (the VM identity, with AcrPull granted when registryResourceId is set) or keyVaultToken (a token from keyVaultSecrets, named by tokenSecretName). Never use a personal access token. Images mirrored into ghcr.io/innofactororg/mirror/* are private, and keyVaultToken with a read-only token in the appliance Key Vault is the supported way to pull them. The private-registry e2e test proves keyVaultToken against a private ghcr.io image. managedIdentity is unproven: it needs an Azure Container Registry, and no test has one. In both modes the agent is logged in only while it pulls, so no token stays on disk. See ADR 10.
Bring your own subnet
existingSubnetResourceId places the appliance in an existing subnet instead of creating a VNet, NSG, NAT Gateway and route table. The module changes nothing about that subnet, so the caller provides egress to the Docker and Ubuntu repositories and the registry, the Microsoft.KeyVault service endpoint (and Microsoft.Storage for activeStandby), and an NSG that allows the inbound ports and, for the load-balanced modes, the AzureLoadBalancer probe. inboundRules, inboundAllowedCidr, createNatGateway, defaultRouteNextHopIpAddress, dnsServers and virtualNetworkPeerings have no effect then.
The subnet must be dedicated and empty. Anything in it other than this appliance’s own hosts and load balancer (resources named <name>-...) fails the deployment with:
The provided value for the template parameter 'applianceRequiresADedicatedEmptySubnet' is not valid. The value 'false' is not part of the allowed value(s): 'True'.
The other cross-parameter rules fail the same way, named for the rule: instanceCountMatchesScaleMode, activeStandbyNeedsADataDisk, loadBalancedModesNeedAPayloadPort and containerRegistrySettingsAreComplete.
Upgrading from the single-VM interface
Every parameter name is kept and single is the default, so a caller that sets nothing new gets one VM as before. What a consumer of the earlier single-VM interface will notice:
- The agent starts the stack, not the Custom Script extension. The extension installs Docker, writes the files and starts the
appliance-agent systemd unit, which runs docker compose up -d. The extension succeeds only when the agent reports active (or standby), so a compose file or image that cannot start still fails the deployment. postComposeCommands now run after the agent has settled. - The data disk is no longer in
/etc/fstab. The agent mounts it by LUN at /opt/<name>/<dataDirectoryName> before it starts the stack, and formats it only when it has no file system at all. A host that only reboots remounts it through the agent. - The data disk name changed. It is
<name>-data-disk (was <name>-host01-data-disk) because it no longer belongs to one host. The VM and OS disk names are unchanged (<name>-host01, <name>-host01-osdisk). vnetAddressPrefix is optional and hostPrivateIpAddress defaults to an empty string (resolved to the same first usable address). Both only matter when the module creates the VNet.- Containers log to the journal (
journald driver, tagged with the container name) instead of the default JSON files, and the data collection rule collects them (syslog facility user). - Outputs.
applianceAddress is new. applianceVmPrivateIpAddress is now an alias of it. applianceVmResourceId is the scale set in loadBalanced mode. - A secret or compose change recreates the stack: the bootstrap compares a hash of the compose file and env files, and the agent runs
docker compose up -d --force-recreate when it changed.
Prerequisites
None of these are created by the module.
- A resource group to deploy into, and an address range for
vnetAddressPrefix registered in whatever IPAM the estate uses, so it cannot collide with another spoke. The module creates and owns its VNet unless existingSubnetResourceId is set. - Egress at provisioning time. With the default NAT Gateway (
createNatGateway = true) nothing more is needed. If egress goes through a hub firewall instead (createNatGateway = false plus defaultRouteNextHopIpAddress), that firewall must already allow the bootstrap’s endpoints, and a missing entry shows as a deny in the firewall log, not as a module error. A NAT Gateway created but left unassociated bills and looks like egress is handled when it is not. If the VNet is later peered to a hub that advertises 0.0.0.0/0, that route overrides the NAT Gateway and redirects egress through the hub. - Rights to deploy role assignments in the resource group. The module grants the new identity
Key Vault Secrets User on its own vault. In loadBalanced mode the deployer also needs policy assignment write (Microsoft.Authorization/policyAssignments/write) at the resource group, for example Resource Policy Contributor, because the module assigns a policy there (see Monitoring). - An alert receiver. Set
alertEmailAddresses and/or itsmWebhookUri. The alerts are always created, but an action group with no receiver delivers nothing. - Quota for the chosen
vmSize in the chosen availabilityZone. A subscription can be barred from a size in some zones and not others; az vm list-skus -l <region> --resource-type virtualMachines shows NotAvailableForSubscription per zone.
Locks: resource-level, never on the resource group
Leave lock unset. A CanNotDelete lock on the resource group also stops Azure Resource Manager deleting the group’s old deployment records, so the group walks to the 800-deployment ceiling and every deployment into it then fails. protectStatefulResources (default true) puts a CanNotDelete lock on each resource that holds state instead: the VM, its OS and data disks, the Key Vault, the Recovery Services vault and the Log Analytics workspace when the module creates it. If a policy in the estate stamps resource-group delete locks, add a policy exemption for this resource group and delete the stamped lock.
Identity
createNewManagedIdentity = true (default) creates a user-assigned identity and grants it only what the module itself needs, Key Vault Secrets User on its own vault (scoped to that vault, and complete before the VM starts its bootstrap). What the payload is allowed to do beyond that is the caller’s decision and is granted to vmIdentityPrincipalId. Setting it to false attaches an existing identity (existingIdentityResourceId, existingIdentityPrincipalId) and grants it nothing; the manualStepsRequiredForReuse output lists the one role assignment still needed. Whoever deploys also needs Managed Identity Operator on a reused identity. Attaching an identity from another subscription in the same tenant is believed to work but is unproven.
Data disk
The dedicated data disk (LUN 0, deleteOption: Detach) is formatted on first use and mounted by the agent at /opt/<name>/<dataDirectoryName>, so it survives deleting the VM and is remounted on restart. There is no /etc/fstab entry. Its host caching is None, because ReadWrite host caching can acknowledge a write that is then lost on host failure, and host read caching only applies to Premium disks.
A data-disk property change on a running VM is an outage. Azure applies any change under dataDisks (caching, size, SKU) by hot-detaching and re-attaching the disk. The guest kernel takes the device offline and the ext4 filesystem on it may not survive, while the VM and the container keep running and look healthy. Check the what-if for a change under dataDisks before every deployment, schedule it as an outage, restart the VM straight afterwards and check the mount.
dataDiskSizeGB = 0 creates no data disk. The data directory is then an ordinary directory on the OS disk, which suits a payload that keeps nothing worth restoring.
Patching
The VM is attached to a dedicated Azure Update Manager maintenance configuration (enablePatchSchedule, maintenanceWindow). The default is 1Month Third Tuesday Offset3 at 22:00 FLE: the third Tuesday of the month plus three days, so the Friday after Patch Tuesday week, ten days after Patch Tuesday. It installs Linux Critical and Security updates and reboots only if required. The schedule is dedicated on purpose. Check that any estate-wide schedule you might attach the VM to includes the Linux Critical and Security classifications: some include only “Other”, and a Linux VM attached to those is never security-patched. With enablePatchSchedule = false Azure patches at times it chooses.
Backup
enableBackup (default true) controls it. Keep it on for anything that holds state; the e2e tests turn it off except waf-aligned, because removing a deployment whose VMs were backed up can leave the resource group undeletable for 14 days (see below). loadBalanced has no VM backup and creates no vault.
Daily VM backup (23:00 UTC; 14 daily and 6 weekly recovery points) covers both disks. The vault has soft delete and enhanced security on, and an Unlocked immutable setting, so recovery points cannot be deleted before they expire. The cost is deliberate: the vault cannot be removed until the 14-day soft-delete period has passed, so tearing a deployment down is a two-step job.
Monitoring
Log collection in loadBalanced. A Flexible scale set does not pass a data collection rule association to its VMs, so the module assigns the built-in policy “Configure Linux Virtual Machines to be associated with a Data Collection Rule or a Data Collection Endpoint” (DeployIfNotExists) at the resource group. The assignment has a system-assigned identity, which the module grants Monitoring Contributor and Log Analytics Contributor (the roles the definition declares) at the resource group, and a remediation task covers instances that exist at deployment. Hosts added later by a scale-out or a repair are associated by the policy too. The association is therefore not part of the deployment: in a sandbox it existed about 35 seconds after the VM was created, and the agent then needs a few minutes to start sending, so expect Heartbeat and Syslog within roughly 5 to 10 minutes of a new host appearing. If the policy misses a host, the next compliance scan (up to 24 hours) or a remediation task associates it. The policy covers the regions in its definition. The VM modes associate each VM in the template and need none of this. See ADR 20.
Each host also runs appliance-heartbeat.timer, which writes one syslog line a minute (appliance-heartbeat, facility user, host=<hostname>,mode=<scaleMode>), so every host has a Syslog row once the agent is configured even when the payload is quiet.
A heartbeat alert (fewer hosts reporting than expected), a sustained-CPU metric alert, a container-restart alert, an action group, a data collection rule (performance counters, syslog and container logs) and a small health workbook. The Docker journald log driver tags each line with the container name and the journal forwards it to syslog facility user, so Syslog | where ProcessName == "<container name>" returns a container’s stdout. Because the journald driver leaves no line when a container restarts, the agent logs container-restarted name=... restarts=... and the restart alert counts those (containerRestartAlertThreshold in 15 minutes). There is deliberately no disk-space metric alert: the Azure Monitor Agent reports the disk/free_percent guest metric as a garbage integer, so a threshold on it can never fire. A payload that needs one measures free space itself and alerts on it from Log Analytics, using the workspaceResourceId and actionGroupResourceId outputs.
Network
The module creates one VNet with one subnet (ApplianceSubnet, carved as the first subnet of vnetAddressPrefix with cidrSubnet() at prefix length applianceSubnetNewBits), with Microsoft.KeyVault and Microsoft.Storage service endpoints, and an NSG that allows only inboundRules and denies the rest. The Key Vault accepts traffic only from that subnet, so no operator or pipeline agent can read it directly. virtualNetworkPeerings with remotePeeringEnabled also writes the remote side, which is a write outside this resource group and needs peer rights on the remote VNet. With defaultRouteNextHopIpAddress set, a route table sends 0.0.0.0/0 to that address with gateway route propagation off, so a route learned over a hub’s gateways cannot send this subnet’s traffic around the firewall; set createNatGateway to false alongside it, because a user-defined default route takes precedence over a NAT Gateway.
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.2.1
Changes
- A
loadBalanced or activeStandby host that the platform schedules for removal (a scale-in, a reboot, a redeploy) now leaves the load balancer pool before it drains. The agent rejects the load balancer’s probe with a TCP reset, waits (probeThreshold + 1) x intervalInSeconds + 5 seconds (20 with the module’s probe), runs drainCommands, stops the stack and only then approves the event. Before, the balancer kept sending new connections to a host that had stopped taking them, and clients saw deferred and refused connections for up to 20 seconds on every scale-in (ADR 21, issue #230). - The drain hook now gets what is left of the event’s
NotBefore (at most 300 seconds), not a fixed 300, and the approval and its result are logged. terminateNotificationProfile.notBeforeTimeout is PT10M (it was PT5M) so that the drain keeps its full budget after the pool exit. - The agent asks the metadata service for scheduled events with a 10-second timeout, so a stuck request cannot stop it from seeing a
Terminate event.
Breaking Changes
0.2.0
Changes
- Fixes
loadBalanced log collection. The data collection rule was associated with the Flexible scale set, which does not pass it to its VMs, so no host sent Heartbeat or Syslog and every log-based alert was dead. The module now assigns the built-in Azure Policy “Configure Linux Virtual Machines to be associated with a Data Collection Rule or a Data Collection Endpoint” (DeployIfNotExists) at the resource group, with its managed identity and the roles the definition declares, and starts a remediation task. Hosts added by a scale-out or replaced by a repair are associated by the policy too (ADR 20, issue 229). - Every host runs a systemd timer,
appliance-heartbeat.timer, that writes one syslog line a minute (logger -t appliance-heartbeat, facility user: host=<hostname>,mode=<scaleMode>). The data collection rule collects only warnings from the system facilities, so a quiet payload left a healthy host with no Syslog row. The line is also a liveness signal in Log Analytics. - The bootstrap waits for apt and dpkg locks before each
apt-get update, retries the update, and stops when a step fails. DPkg::Lock::Timeout does not cover the lists lock, so an apt-get update racing another apt at first boot failed and the Docker install followed with no candidate. - The e2e tests now assert that Heartbeat and Syslog rows from every host reach the workspace. The test probe takes
workspaceResourceId, hostNamePrefix and expectedHostCount.
Breaking Changes
loadBalanced only: the identity that deploys the module (the pipeline service principal or the person running the deployment) must now be granted both of these at the appliance resource group, or at a scope above it:Microsoft.Authorization/policyAssignments/write, for example the built-in role Resource Policy Contributor.Microsoft.Authorization/roleAssignments/write, for example User Access Administrator or Role Based Access Control Administrator. The module already needed this to grant the appliance identity Key Vault access, but it now also grants Monitoring Contributor and Log Analytics Contributor to the policy assignment’s identity, so a role assignment condition that limits the deployer to other roles blocks it.- Owner at the resource group covers both. The VM modes (
single, activeStandby) need no new permission.
- A new
loadBalanced host is associated with the data collection rule by policy shortly after it is created, not as part of the deployment.
0.1.1
Changes
loadBalanced hosts are now repaired automatically. The scale set turns on automaticRepairsPolicy, driven by the existing Application Health probe, with automaticRepairGracePeriod (default PT30M) and automaticRepairAction (default Restart). Restart keeps the OS disk, so a payload that keeps a queue there (the SMTP relay) does not lose it; Replace and Reimage do (ADR 19).- The Application Health probe now needs three failed checks in a row (was one) before a host counts as unhealthy, so one dropped connection cannot trigger a repair or hold back a patch.
- Clears the PSRule WAF Reliability rule
Azure.VMSS.AutoInstanceRepairs.
Breaking Changes
0.1.0
Changes
- First release of the module. A payload-agnostic landing-zone pattern for a managed container appliance: its own VNet, subnet, NSG and NAT Gateway (or a subnet you bring), VM and disks, managed identity, Key Vault, backup, monitoring, alerting and patching. See the README for parameters and examples.
- Three scale modes,
single (the default), activeStandby and loadBalanced, selected with scaleMode (ADR 9). Both load-balanced modes publish one address, applianceAddress. activeStandby keeps one data disk that follows the active host, guarded by a blob lease. Switchover is a control-plane operation, so the hosts hold no rights over each other (ADR 11).containerRegistry authenticates to the image registry anonymously, with the VM identity, or with a Key Vault token. Personal access tokens are not accepted (ADR 10).- Container logs go to the journal through Docker’s
journald driver and are collected into Log Analytics. A generic container-restart alert is included. existingSubnetResourceId places the appliance in an empty subnet you provide. The deployment fails with “appliance requires a dedicated empty subnet” when the subnet holds anything else.- The
loadBalanced hosts are patched by Azure’s automatic guest patching, with an Application Health extension. They have no custom patch window. enableBackup (default true) turns VM backup, and the Recovery Services vault, off for throwaway deployments. loadBalanced never backs up VMs.- Host names are no longer fixed: alerts, the workbook and disk names follow the hosts of the chosen mode.
- Tests: defaults, no-data-disk, waf-aligned, active-standby (with a timed switchover), load-balanced and byo-subnet. Each deploys a web payload and curls the appliance address from a client VM.
Breaking Changes
Version history
| Version | Published |
|---|
0.2.1 | 2026-11-24 |
0.2.0 | 2026-11-23 |
0.1.1 | 2026-11-14 |
0.1.0 | 2026-11-14 |
Container Registry Landing Zone
br/innofactor:avm/ptn/lz/container-registry:0.3.0
README
Azure Container Registry [Lz/ContainerRegistry]
This Instance deploys an Azure Container Registry.
Navigation
Resource Types
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/lz/container-registry:<version>.
Example 1: Azure Container Registry (Landing Zone Submodule Minimal)
This module deploys an Azure Continer Registry using minimal parameters.
via Bicep module
module containerRegistry 'br/innofactor:avm/ptn/lz/container-registry:<version>' = {
name: 'containerRegistryDeployment'
params: {
// Required parameters
name: 'acrlzmin001'
// Non-required parameters
location: '<location>'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"name": {
"value": "acrlzmin001"
},
// Non-required parameters
"location": {
"value": "<location>"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-registry:<version>'
// Required parameters
param name = 'acrlzmin001'
// Non-required parameters
param location = '<location>'
Example 2: Azure Container Registry (Landing Zone Submodule WAF)
This module deploys an Azure Continer Registry using Well Architected Framework parameters.
via Bicep module
module containerRegistry 'br/innofactor:avm/ptn/lz/container-registry:<version>' = {
name: 'containerRegistryDeployment'
params: {
// Required parameters
name: 'acrlzwaf001'
// Non-required parameters
acrSku: 'Premium'
location: '<location>'
publicNetworkAccess: 'Disabled'
replications: [
{
location: '<location>'
name: '<name>'
}
]
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"name": {
"value": "acrlzwaf001"
},
// Non-required parameters
"acrSku": {
"value": "Premium"
},
"location": {
"value": "<location>"
},
"publicNetworkAccess": {
"value": "Disabled"
},
"replications": {
"value": [
{
"location": "<location>",
"name": "<name>"
}
]
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/container-registry:<version>'
// Required parameters
param name = 'acrlzwaf001'
// Non-required parameters
param acrSku = 'Premium'
param location = '<location>'
param publicNetworkAccess = 'Disabled'
param replications = [
{
location: '<location>'
name: '<name>'
}
]
Parameters
Required parameters
| Parameter | Type | Description |
|---|
name | string | Name of the resource to create. |
Optional parameters
| Parameter | Type | Description |
|---|
acrSku | string | The SKU of the container registry. Geo-replication requires Premium. |
adminUserEnabled | bool | Enable/Disable Admin User. |
anonymousPullEnabled | bool | Enable/Disable Anonymous Pull, defaults of false. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
environment | string | The environment to deploy the resources to. |
location | string | Location for all Resources. |
publicNetworkAccess | string | Whether public network access is allowed. Disabling it requires the Premium SKU. |
replications | array | Geo-replications of the container registry. Requires acrSku to be Premium. Each entry needs a name and a location that differs from the registry location. |
tags | object | Tags to be added to the resources. |
Parameter: name
Name of the resource to create.
- Required: Yes
- Type: string
Parameter: acrSku
The SKU of the container registry. Geo-replication requires Premium.
- Required: No
- Type: string
- Default:
'Standard' - Allowed:
[
'Basic'
'Premium'
'Standard'
]
Parameter: adminUserEnabled
Enable/Disable Admin User.
- Required: No
- Type: bool
- Default:
False
Parameter: anonymousPullEnabled
Enable/Disable Anonymous Pull, defaults of false.
- Required: No
- Type: bool
- Default:
False
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: environment
The environment to deploy the resources to.
- Required: No
- Type: string
- Default:
'Prod'
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[deployment().location]
Parameter: publicNetworkAccess
Whether public network access is allowed. Disabling it requires the Premium SKU.
- Required: No
- Type: string
- Default:
'Enabled' - Allowed:
Parameter: replications
Geo-replications of the container registry. Requires acrSku to be Premium. Each entry needs a name and a location that differs from the registry location.
Tags to be added to the resources.
- Required: No
- Type: object
- Default:
{
Contact: 'damian.flynn@innofactor.com'
Environment: 'Prod'
'hidden-title': 'Innofactor Bicep Container Registry'
Owner: 'Azure Practice'
Repository: 'innofactororg/azure-solutions'
Role: 'Registry'
}
Outputs
None
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/public:avm/res/container-registry/registry:0.8.1 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.3.0
Changes
- Added the
acrSku parameter (default Standard, as before). Geo-replication and disabling public access require Premium. - Added the
replications parameter for geo-replication (default: none) and the publicNetworkAccess parameter (default Enabled, as before). - The waf-aligned test deploys a Premium registry with a geo-replica and public access disabled, which satisfies the PSRule WAF Reliability rules.
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
- None. The new parameters default to the previous behaviour.
0.2.7
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.2.6
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.2.5
Changes
Breaking Changes
0.2.4
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.2.3
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.2.2
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.2.1
Changes
- 55 test placement replacement (#58)
Breaking Changes
0.2.0
Changes
Breaking Changes
Version history
| Version | Published |
|---|
0.3.0 | 2026-11-16 |
0.2.7 | 2025-02-01 |
0.2.6 | 2025-01-31 |
0.2.5 | 2025-01-30 |
0.2.4 | 2025-01-29 |
0.2.2 | 2025-01-29 |
0.2.1 | 2025-01-29 |
0.2.0 | 2025-01-29 |
Azure Hub Landing Zone
br/innofactor:avm/ptn/lz/hub:0.1.5
Overview
Hub Network Configuration Module
This module deploys a workload virtual network with associated resources, providing a standardized approach to configuring network infrastructure for workload environments. It simplifies the deployment process by automating the setup of key networking components and ensuring best practices for security and connectivity.
Features Implemented
Default Behavior
By default, the module creates a Hub Virtual Network with the address space defaulted to ‘10.0.0.0/22’.
Subnets
The module creates the following subnets:
| Subnet Name | Purpose | Address Space | Service Endpoints | Route Table | NSG | Private Endpoint Network Policies | Private Link Service Network Policies |
|---|
| GatewaySubnet | Reserved for VPN and ExpressRoute gateways | 10.0.0.0/26 | None | Yes | No | Disabled | Disabled |
| RouterFrontendSubnet | Reserved for third-party site-to-site networking | 10.0.0.64/26 | None | Yes | No | Disabled | Disabled |
| RouterBackendSubnet | Reserved for third-party site-to-site networking | 10.0.0.192/26 | None | Yes | No | Disabled | Disabled |
| RouteServerSubnet | Reserved for route server | 10.0.3.128/26 | None | No | No | Disabled | Disabled |
| AzureFirewallSubnet | Reserved for Azure Firewall | 10.0.1.0/24 | Microsoft.Storage, Microsoft.Sql, Microsoft.AzureCosmosDB, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.EventHub, Microsoft.Web, Microsoft.CognitiveServices | Yes | No | Disabled | Disabled |
| AzureFirewallManagementSubnet | Reserved for Azure Firewall management | 10.0.2.0/24 | None | Yes | No | Disabled | Disabled |
| AzureBastionSubnet | Reserved for Azure Bastion | 10.0.3.192/26 | None | No | Yes | Disabled | Disabled |
Route Tables
The module creates route tables for each subnet with the following routes:
| Route Table Name | Route Name | Note | Address Prefix | Next Hop IP Address | Next Hop Type |
|---|
| GatewaySubnet-rt | | | | | |
| RouterFrontendSubnet-rt | | | | | |
| RouterBackendSubnet-rt | | | | | |
| AzureFirewallSubnet-rt | Everywhere | Default route for Azure Firewall | 0.0.0.0/0 | | Internet |
| AzureFirewallManagementSubnet-rt | Everywhere | Default route for Azure Firewall management | 0.0.0.0/0 | | Internet |
Network Security Groups
The module attaches NSGs to subnets with the following security rules:
| Rule Name | Description | Direction | Priority | Protocol | Source | Destination | Action |
|---|
| AllowHttpsFromInterntToAzurebastionsubnet | Allow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1000 | Tcp | Internet | * | Allow |
| AllowHttpsFromGatewaymanagerToAzurebastionsubnet | Allow control plane traffic from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1100 | Tcp | GatewayManager | * | Allow |
| AllowHttpsFromAzureLoadBalancerToAzurebastionsubnet | Allow control plane traffic from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1200 | Tcp | AzureLoadBalancer | * | Allow |
| AllowBastionHostCommunicationToAzurebastionsubnet | Allow control plane traffic from Azure Gateway Manager to the Azure Bastion Subnet | Inbound | 1300 | Tcp | VirtualNetwork | VirtualNetwork | Allow (Ports: 8080, 5701) |
| DenyAll | Deny all other traffic and override the default AllowVnetInBound rule | Inbound | 4000 | * | * | * | Deny |
| AllowSshRdpFromAzurebastionsubnetToVirtualNetwork | Allow RDP and SSH from Azure Bastion Subnet to the Virtual Network | Outbound | 1000 | Tcp | * | VirtualNetwork | Allow (Ports: 22, 3389) |
| AllowHttpsFromAzurebastionsubnetToAzureCloud | Allow HTTPS from Azure Bastion Subnet to Azure Cloud for diagnostics and monitoring | Outbound | 1100 | Tcp | * | AzureCloud | Allow |
| AllowBastionCommunicationFromAzurebastionsubnetToVirtualNetwork | Allow data plane communication between the underlying components of Azure Bastion and the Virtual Network | Outbound | 1200 | * | VirtualNetwork | VirtualNetwork | Allow (Ports: 8080, 5701) |
| AllowGetSessionInformationFromAzurebastionsubnetToInternet | Allow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion Subnet | Outbound | 1300 | * | * | Internet | Allow (Port: 80) |
Customization
The module supports extensive customization through parameters, including:
- Virtual Network and subnet address spaces
- NSG rules and route table entries
- Peering configurations
- Azure Firewall rule collections
- Diagnostic and monitoring settings
This module ensures a consistent and secure approach to deploying workload networking infrastructure, reducing manual configuration efforts and enforcing organizational standards.
Quick Start
To use this module, provide the necessary parameters such as name, location, and virtual network configuration. The module will handle the deployment and configuration of all associated networking resources.
module workloadNetwork 'br/public:avm/ptn/lz/hub:<version>' = {
name: 'workloadNetworkDeployment'
params: {
location: enforcedLocation
instancePrefix: '10.0.0.0/16'
}
}
This deployment will create a basic workload network setup, which can be further customized as needed.
Parameters
| Name | Type | Required | Default | Description |
|---|
azureBastionConfig | bastionConfigType (object) | No | {} | Optional. Configuration settings for the Azure Bastion Host. |
deploymentOptions | deploymentOptionsType (object) | No | {"vpnGateway": false, "expressRouteGateway": false, "azur... | Optional. Will Azure Firewall be deployed or not. |
diagnosticsStorage | monitoringStorageType (object) | No | {} | Optional. Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty. |
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
expressRouteGatewayConfig | gatewayType (object) | No | {} | Optional. Configuration settings for the Express Route Gateway. |
firewallConfig | firewallConfigType (object) | No | {} | Optional. Configuration settings for the Azure Firewall. |
firewallPolicyConfig | firewallPolicyConfigType (object) | No | {} | Optional. Configuration settings for the Azure Firewall Policy. |
instancePrefix | string | No | "10.0.0.0/16" | Optional. The hub & spoke address space. Defaults to 10.0.0.0/16. |
location | string | No | "[deployment().location]" | Optional. Location for all resources. |
lock | lockType (object) | No | | Optional. The lock settings of the service. |
name | string | No | "[replace(subscription().displayName, ' ', '-')]" | Optional. Name of the Network Watcher resource (hidden). |
partnerCountry | string | No | "norway" | Optional. The Partner ID for partner attribution. |
roleAssignments | roleAssignmentType (array) | No | | Optional. Array of role assignments to create. |
routeServerBgpPeers | bgpConnectionType (array) | No | [] | Optional. An array detailing the remote BGP peers of this Route Server. |
tags | object | No | | Optional. Tags of the resource. |
vpnGatewayConfig | gatewayType (object) | No | {} | Optional. Configuration settings for the VPN Gateway. |
Outputs
| Name | Type | Description |
|---|
azureBastionLocation | string | The location the Azure Bastion was deployed into. |
azureBastionName | string | The name of the Azure Bastion. |
azureBastionResourceId | string | The resource ID of the Azure Bastion. |
erGatewayActiveActive | bool | Shows if the virtual network gateway is configured in Active-Active mode. |
erGatewayAsn | int | The ASN (Autonomous System Number) of the virtual network gateway. |
erGatewayCustomBgpIpAddresses | string | The primary custom Azure APIPA BGP IP address. |
erGatewayDefaultBgpIpAddresses | string | The primary default Azure BGP peer IP address. |
erGatewayId | string | The resource ID of the virtual network gateway. |
erGatewayIpConfigurations | array | The IPconfigurations object of the Virtual Network Gateway. |
erGatewayLocation | string | The location the resource was deployed into. |
erGatewayName | string | The name of the virtual network gateway. |
erGatewayPrimaryPublicIpAddress | string | The primary public IP address of the virtual network gateway. |
erGatewaySecondaryCustomBgpIpAddress | string | The secondary custom Azure APIPA BGP IP address (Active-Active mode). |
erGatewaySecondaryDefaultBgpAddress | string | The secondary default Azure BGP peer IP address (Active-Active mode). |
erGatewaySecondaryPublicIpAddress | string | The secondary public IP address of the virtual network gateway (Active-Active mode). |
networkResourceGroupResourceId | string | The resource ID of the deployed virtual network. |
networkWatcherLocation | string | The location the resource was deployed into. |
networkWatcherResourceGroupId | string | The resource group ID of the deployed network watcher. |
networkWatcherResourceGroupName | string | The resource group the network watcher was deployed into. |
networkWatcherResourceId | string | The resource ID of the deployed network watcher. |
networkWatchername | string | The name of the deployed network watcher. |
nsgNames | array | The name of the route table. |
nsgNamesList | array | The names of all Routes provided. |
nsgResourceIds | array | The resource ID of the route table. |
routeNamesList | array | The names of all Routes provided. |
routeTableNames | array | The name of the route table. |
routeTableResourceIds | array | The resource ID of the route table. |
subnetNames | array | The names of the deployed subnets. |
subnetResourceIds | array | The resource IDs of the deployed subnets. |
virtualNetworkName | string | The name of the virtual network. |
virtualNetworkResourceId | string | The resource IDs of the deployed virtual network. |
vpnGatewayActiveActive | bool | Shows if the virtual network gateway is configured in Active-Active mode. |
vpnGatewayAsn | int | The ASN (Autonomous System Number) of the virtual network gateway. |
vpnGatewayCustomBgpIpAddresses | string | The primary custom Azure APIPA BGP IP address. |
vpnGatewayDefaultBgpIpAddresses | string | The primary default Azure BGP peer IP address. |
vpnGatewayId | string | The resource ID of the virtual network gateway. |
vpnGatewayIpConfigurations | array | The IPconfigurations object of the Virtual Network Gateway. |
vpnGatewayLocation | string | The location the resource was deployed into. |
vpnGatewayName | string | The name of the virtual network gateway. |
vpnGatewayPrimaryPublicIpAddress | string | The primary public IP address of the virtual network gateway. |
vpnGatewaySecondaryCustomBgpIpAddress | string | The secondary custom Azure APIPA BGP IP address (Active-Active mode). |
vpnGatewaySecondaryDefaultBgpAddress | string | The secondary default Azure BGP peer IP address (Active-Active mode). |
vpnGatewaySecondaryPublicIpAddress | string | The secondary public IP address of the virtual network gateway (Active-Active mode). |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|
0.1.5 | 2025-06-23 |
0.1.4 | 2025-06-16 |
0.1.3 | 2025-06-10 |
0.1.2 | 2025-06-09 |
0.1.1 | 2025-06-05 |
0.1.0 | 2025-05-30 |
SMTP Relay Landing Zone
br/innofactor:avm/ptn/lz/smtp-relay:0.2.0
README
SMTP Relay (Landing Zone Pattern) [Lz/SmtpRelay]
A managed SMTP relay: Postfix on N hosts behind an internal load balancer, delivering mail through Microsoft Graph, with its own network, Key Vault, monitoring and payload alerts. Subscription-scope wrapper: it creates ONE resource group, then invokes smtp-relay.bicep, which renders the compose file from parameters and calls the container-appliance pattern module (avm/ptn/lz/container-appliance) in loadBalanced mode.
All parameters pass straight through. The hub side is a prerequisite this module does not write: a firewall DNAT rule to the load balancer address, and hub return routes for the relay subnet (workload-networking hubReturnRoutes). See the Notes section.
Navigation
Resource Types
| Resource Type | API Version |
|---|
Microsoft.Authorization/locks | 2020-05-01 |
Microsoft.Authorization/policyAssignments | 2024-04-01 |
Microsoft.Authorization/roleAssignments | 2022-04-01 |
Microsoft.Automanage/configurationProfileAssignments | 2022-05-04 |
Microsoft.Compute/disks | 2024-03-02 |
Microsoft.Compute/virtualMachines | 2024-07-01 |
Microsoft.Compute/virtualMachines/extensions | 2022-11-01 |
Microsoft.Compute/virtualMachineScaleSets | 2024-07-01 |
Microsoft.DevTestLab/schedules | 2018-09-15 |
Microsoft.GuestConfiguration/guestConfigurationAssignments | 2020-06-25 |
Microsoft.Insights/actionGroups | 2023-01-01 |
Microsoft.Insights/dataCollectionRuleAssociations | 2023-03-11 |
Microsoft.Insights/dataCollectionRules | 2023-03-11 |
Microsoft.Insights/diagnosticSettings | 2021-05-01-preview |
Microsoft.Insights/metricAlerts | 2018-03-01 |
Microsoft.Insights/scheduledQueryRules | 2025-01-01-preview |
Microsoft.Insights/workbooks | 2023-06-01 |
Microsoft.KeyVault/vaults | 2024-11-01 |
Microsoft.KeyVault/vaults/accessPolicies | 2024-11-01 |
Microsoft.KeyVault/vaults/keys | 2024-11-01 |
Microsoft.KeyVault/vaults/secrets | 2024-11-01 |
Microsoft.Maintenance/configurationAssignments | 2023-04-01 |
Microsoft.Maintenance/maintenanceConfigurations | 2023-04-01 |
Microsoft.ManagedIdentity/userAssignedIdentities | 2024-11-30 |
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials | 2024-11-30 |
Microsoft.Network/loadBalancers | 2024-05-01 |
Microsoft.Network/natGateways | 2023-04-01 |
Microsoft.Network/networkInterfaces | 2024-05-01 |
Microsoft.Network/networkSecurityGroups | 2023-11-01 |
Microsoft.Network/privateEndpoints | 2024-10-01 |
Microsoft.Network/privateEndpoints | 2023-11-01 |
Microsoft.Network/privateEndpoints | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-10-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2023-11-01 |
Microsoft.Network/publicIPAddresses | 2023-09-01 |
Microsoft.Network/publicIPAddresses | 2024-05-01 |
Microsoft.Network/publicIPPrefixes | 2023-09-01 |
Microsoft.Network/routeTables | 2024-05-01 |
Microsoft.Network/virtualNetworks | 2024-05-01 |
Microsoft.Network/virtualNetworks/subnets | 2024-05-01 |
Microsoft.Network/virtualNetworks/virtualNetworkPeerings | 2024-01-01 |
Microsoft.OperationalInsights/workspaces | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/dataExports | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/dataSources | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/linkedServices | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/linkedStorageAccounts | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/savedSearches | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/storageInsightConfigs | 2025-02-01 |
Microsoft.OperationalInsights/workspaces/tables | 2025-02-01 |
Microsoft.OperationsManagement/solutions | 2015-11-01-preview |
Microsoft.PolicyInsights/remediations | 2021-10-01 |
Microsoft.RecoveryServices/vaults | 2024-04-01 |
Microsoft.RecoveryServices/vaults/backupconfig | 2023-01-01 |
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems | 2024-10-01 |
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems | 2023-01-01 |
Microsoft.RecoveryServices/vaults/backupPolicies | 2024-10-01 |
Microsoft.RecoveryServices/vaults/backupstorageconfig | 2023-01-01 |
Microsoft.RecoveryServices/vaults/replicationAlertSettings | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings | 2022-10-01 |
Microsoft.RecoveryServices/vaults/replicationPolicies | 2023-06-01 |
Microsoft.Resources/resourceGroups | 2021-04-01 |
Microsoft.SecurityInsights/onboardingStates | 2024-03-01 |
Microsoft.Storage/storageAccounts | 2025-06-01 |
Microsoft.Storage/storageAccounts/blobServices | 2025-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers | 2025-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies | 2025-01-01 |
Microsoft.Storage/storageAccounts/fileServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/fileServices/shares | 2025-01-01 |
Microsoft.Storage/storageAccounts/localUsers | 2025-06-01 |
Microsoft.Storage/storageAccounts/managementPolicies | 2025-06-01 |
Microsoft.Storage/storageAccounts/objectReplicationPolicies | 2025-01-01 |
Microsoft.Storage/storageAccounts/queueServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/queueServices/queues | 2025-06-01 |
Microsoft.Storage/storageAccounts/tableServices | 2025-06-01 |
Microsoft.Storage/storageAccounts/tableServices/tables | 2025-06-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/lz/smtp-relay:<version>.
Example 1: Using only defaults
This instance deploys the SMTP relay with its own VNet and a single host behind the internal load balancer, pulling the relay image by digest with a read-only registry token. A client VM in the relay subnet proves, through the load balancer address, that the relay accepts mail from an allowed sender and refuses a sender that is not on the list, then sends a real message to a sandbox mailbox and proves from the relay log and through Graph that it arrived. The sandbox Graph app and mailbox come from the CI Key Vault (CI-graphTenantId, CI-graphClientId, CI-graphClientSecret, CI-graphTestMailbox); the deployment fails at validation, naming the parameter, while one is missing.
via Bicep module
module smtpRelay 'br/innofactor:avm/ptn/lz/smtp-relay:<version>' = {
name: 'smtpRelayDeployment'
params: {
// Required parameters
graphClientId: '<graphClientId>'
graphClientSecret: '<graphClientSecret>'
graphSenderMailbox: '<graphSenderMailbox>'
graphTenantId: '<graphTenantId>'
inboundAllowedCidr: '10.0.0.0/8'
mailDomain: 'example.test'
myNetworks: [
'10.242.0.0/24'
]
relayHostname: 'relay.example.test'
senderAllowList: [
'probe@example.test'
]
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
// Non-required parameters
enableKeyVaultPurgeProtection: false
instanceCount: 1
keyVaultName: '<keyVaultName>'
location: '<location>'
name: '<name>'
registryToken: '<registryToken>'
scaleSetZones: [
1
2
]
vnetAddressPrefix: '10.242.0.0/24'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"graphClientId": {
"value": "<graphClientId>"
},
"graphClientSecret": {
"value": "<graphClientSecret>"
},
"graphSenderMailbox": {
"value": "<graphSenderMailbox>"
},
"graphTenantId": {
"value": "<graphTenantId>"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"mailDomain": {
"value": "example.test"
},
"myNetworks": {
"value": [
"10.242.0.0/24"
]
},
"relayHostname": {
"value": "relay.example.test"
},
"senderAllowList": {
"value": [
"probe@example.test"
]
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
// Non-required parameters
"enableKeyVaultPurgeProtection": {
"value": false
},
"instanceCount": {
"value": 1
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"name": {
"value": "<name>"
},
"registryToken": {
"value": "<registryToken>"
},
"scaleSetZones": {
"value": [
1,
2
]
},
"vnetAddressPrefix": {
"value": "10.242.0.0/24"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/smtp-relay:<version>'
// Required parameters
param graphClientId = '<graphClientId>'
param graphClientSecret = '<graphClientSecret>'
param graphSenderMailbox = '<graphSenderMailbox>'
param graphTenantId = '<graphTenantId>'
param inboundAllowedCidr = '10.0.0.0/8'
param mailDomain = 'example.test'
param myNetworks = [
'10.242.0.0/24'
]
param relayHostname = 'relay.example.test'
param senderAllowList = [
'probe@example.test'
]
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
// Non-required parameters
param enableKeyVaultPurgeProtection = false
param instanceCount = 1
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param name = '<name>'
param registryToken = '<registryToken>'
param scaleSetZones = [
1
2
]
param vnetAddressPrefix = '10.242.0.0/24'
Example 2: WAF-aligned
This instance deploys the SMTP relay in alignment with the best practices of the Azure Well-Architected Framework: two hosts spread behind the internal load balancer, placed in an empty subnet the caller brings (here in a VNet the test creates, with a client subnet beside it), CanNotDelete locks on the stateful resources and deliberately NO resource-group lock, a purge-protected Key Vault, and an alert email receiver. The client sits on a network that is NOT in myNetworks, and the test proves the relay still answers EHLO but refuses to relay for it. Real Graph delivery is proven by the defaults test.
via Bicep module
module smtpRelay 'br/innofactor:avm/ptn/lz/smtp-relay:<version>' = {
name: 'smtpRelayDeployment'
params: {
// Required parameters
graphClientId: '00000000-0000-0000-0000-000000000000'
graphClientSecret: '<graphClientSecret>'
graphSenderMailbox: 'relay@example.test'
graphTenantId: '00000000-0000-0000-0000-000000000000'
inboundAllowedCidr: '10.0.0.0/8'
mailDomain: 'example.test'
myNetworks: [
'192.0.2.0/24'
]
relayHostname: 'relay.example.test'
senderAllowList: [
'probe@example.test'
]
sshPublicKey: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
// Non-required parameters
alertEmailAddresses: [
'platform-alerts@example.com'
]
availabilityZone: 1
existingSubnetResourceId: '<existingSubnetResourceId>'
instanceCount: 2
keyVaultName: '<keyVaultName>'
location: '<location>'
name: '<name>'
protectStatefulResources: true
registryToken: '<registryToken>'
scaleSetZones: [
1
2
]
tags: {
Environment: 'Test'
Workload: 'smtp-relay'
}
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"graphClientId": {
"value": "00000000-0000-0000-0000-000000000000"
},
"graphClientSecret": {
"value": "<graphClientSecret>"
},
"graphSenderMailbox": {
"value": "relay@example.test"
},
"graphTenantId": {
"value": "00000000-0000-0000-0000-000000000000"
},
"inboundAllowedCidr": {
"value": "10.0.0.0/8"
},
"mailDomain": {
"value": "example.test"
},
"myNetworks": {
"value": [
"192.0.2.0/24"
]
},
"relayHostname": {
"value": "relay.example.test"
},
"senderAllowList": {
"value": [
"probe@example.test"
]
},
"sshPublicKey": {
"value": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test"
},
// Non-required parameters
"alertEmailAddresses": {
"value": [
"platform-alerts@example.com"
]
},
"availabilityZone": {
"value": 1
},
"existingSubnetResourceId": {
"value": "<existingSubnetResourceId>"
},
"instanceCount": {
"value": 2
},
"keyVaultName": {
"value": "<keyVaultName>"
},
"location": {
"value": "<location>"
},
"name": {
"value": "<name>"
},
"protectStatefulResources": {
"value": true
},
"registryToken": {
"value": "<registryToken>"
},
"scaleSetZones": {
"value": [
1,
2
]
},
"tags": {
"value": {
"Environment": "Test",
"Workload": "smtp-relay"
}
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/lz/smtp-relay:<version>'
// Required parameters
param graphClientId = '00000000-0000-0000-0000-000000000000'
param graphClientSecret = '<graphClientSecret>'
param graphSenderMailbox = 'relay@example.test'
param graphTenantId = '00000000-0000-0000-0000-000000000000'
param inboundAllowedCidr = '10.0.0.0/8'
param mailDomain = 'example.test'
param myNetworks = [
'192.0.2.0/24'
]
param relayHostname = 'relay.example.test'
param senderAllowList = [
'probe@example.test'
]
param sshPublicKey = 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM9TTqqoeYf+/iC1UenThlG3LrKakoeCeDQS3veHJqXe avs-e2e-test'
// Non-required parameters
param alertEmailAddresses = [
'platform-alerts@example.com'
]
param availabilityZone = 1
param existingSubnetResourceId = '<existingSubnetResourceId>'
param instanceCount = 2
param keyVaultName = '<keyVaultName>'
param location = '<location>'
param name = '<name>'
param protectStatefulResources = true
param registryToken = '<registryToken>'
param scaleSetZones = [
1
2
]
param tags = {
Environment: 'Test'
Workload: 'smtp-relay'
}
Parameters
Required parameters
| Parameter | Type | Description |
|---|
graphClientId | string | Client (application) ID of the Entra app registration: single tenant, no public client flows, and the Mail.Send application permission only, admin-consented. The app registration is a prerequisite: it is a Graph object, not an ARM resource. |
graphClientSecret | securestring | Client secret of that app registration. Stored in the appliance Key Vault and written to an env file on the host at boot. Never part of the compose file. |
graphSenderMailbox | string | The mailbox Graph sends as. Every message is sent from this mailbox, whatever the original sender. It must be a real Exchange Online mailbox, shared (no licence needed) or licensed: a user whose licence was removed has no mailbox. Restrict the Entra app to it with an application access policy (see the README prerequisites). |
graphTenantId | string | Entra tenant ID of the app registration that sends the mail. |
inboundAllowedCidr | string | CIDR allowed inbound to the relay on port 25: the subnet the hub firewall forwards from. This module opens nothing else. |
mailDomain | string | The mail domain: Postfix mydomain and myorigin, for example contoso.com. |
myNetworks | array | Networks allowed to relay, as CIDRs. Used verbatim as Postfix mynetworks: nothing is added, so list loopback yourself if you need it. At least one entry. |
relayHostname | string | The name the relay announces: Postfix myhostname and the SMTP banner, for example smtp.contoso.com. |
senderAllowList | array | Sender addresses (or domain names, which match every address in them) allowed to send through the relay. The Graph mailbox is always allowed. Enforced for every client, trusted networks included. At least one entry. |
sshPublicKey | string | SSH public key for the admin account. Password sign-in is disabled. |
Conditional parameters
| Parameter | Type | Description |
|---|
existingIdentityPrincipalId | string | Required if createNewManagedIdentity is false. Principal ID of the existing identity. |
existingIdentityResourceId | string | Required if createNewManagedIdentity is false. Resource ID of the existing identity. |
registryToken | securestring | Required if containerRegistry.mode is keyVaultToken. A read-only registry token (read:packages) issued to a service identity, never to a person. Stored in the appliance Key Vault as the secret named by containerRegistry.tokenSecretName. |
vnetAddressPrefix | string | Required if existingSubnetResourceId is empty. Address space for the relay’s own VNet, for example 10.20.0.0/24. |
Optional parameters
| Parameter | Type | Description |
|---|
adminUsername | string | Local admin username on the hosts. |
alertEmailAddresses | array | Email addresses added to the action group. A service desk mailbox turns each alert into a ticket. |
applianceSubnetNewBits | int | Prefix length of the appliance subnet, carved as the first subnet of vnetAddressPrefix (27 = a /27, about 26 hosts). Despite the name, this is a prefix length. |
availabilityZone | int | Availability zone for the hosts that are not spread by scaleSetZones. |
businessHoursEndUtc | int | Business hours end at the start of this hour, UTC, 1 to 24. Weekdays only. |
businessHoursStartUtc | int | First business hour, UTC, 0 to 23. |
containerRegistry | object | How the hosts pull the relay image. The default is ghcr.io with a read-only token held in the appliance Key Vault (mode keyVaultToken, secret registry-token). The relay image package is private, so the token is needed. Use anonymous only if the package is public, or managedIdentity for an Azure Container Registry. |
containerRestartAlertThreshold | int | The container-restart alert fires when the relay container restarts more than this many times in 15 minutes. |
createNatGateway | bool | Create and associate a NAT Gateway for outbound egress. Ignored with existingSubnetResourceId. |
createNewManagedIdentity | bool | Create a new user-assigned identity (true) or attach an existing one (false). |
defaultRouteNextHopIpAddress | string | Next-hop IP for a 0.0.0.0/0 route on the relay subnet, for example the hub firewall. Ignored with existingSubnetResourceId. |
dnsServers | array | Custom DNS servers for the relay VNet. Ignored with existingSubnetResourceId. |
drainTimeoutSeconds | int | Seconds the drain waits for the queue to empty when a host goes away. The appliance gives a drain command 300 seconds, so keep this below that. |
enableKeyVaultPurgeProtection | bool | Purge protection on the Key Vault. Default true; turn off only for throwaway deployments. |
enableNoDeliveryAlert | bool | Alert when no mail was delivered for an hour inside business hours. Turn it off for a relay that legitimately carries no weekday traffic. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
existingSubnetResourceId | string | Resource ID of an existing, dedicated and empty subnet to place the relay in, instead of creating a VNet. See the container-appliance module for what that subnet must provide. |
graphFailureAlertThreshold | int | The graph-send-failures alert fires when the relay logs more than this many deferred or rejected Graph sends in 15 minutes. |
hostPrivateIpAddress | string | Static private IP for the first host. Empty uses the container-appliance default. |
imageReference | string | The relay container image, <registry>/<repository>@sha256:<digest>. Always pinned by digest: the deployment fails without a 64-character @sha256: digest. The default is the vendor-neutral relay image at the digest built from relay commit 58bf566 (the build publishes the digest as a workflow output). |
instanceCount | int | Number of relay hosts, all active together behind the internal load balancer. Every host takes an address in the subnet. |
itsmWebhookUri | string | ITSM webhook URI for the action group. |
keyVaultName | string | Name of the appliance Key Vault. Empty derives it from the name. |
location | string | Azure region to deploy the resources. |
lock | object | A lock to apply to the whole resource group. NOT recommended: it stops Azure Resource Manager grooming deployment history and eventually fails every deployment. Use protectStatefulResources instead. |
messageSizeLimitBytes | int | Largest message the relay accepts, in bytes. Graph rejects a message above its own limit, so keep this at or below it. |
name | string | Short name used to derive every resource name. Lowercase alphanumeric and hyphens, kept short. |
protectStatefulResources | bool | CanNotDelete locks on each resource that holds state, instead of on the resource group. See the container-appliance module. |
queuedMailAlertThreshold | int | The queued-mail alert fires when a host has held more than this many messages for the whole 15-minute window. |
relayHost | string | Next hop Postfix names as relayhost. Mail is delivered through Graph, so this rarely matters. |
relayHostPort | int | Port of relayHost. |
resourceGroupName | string | Name of the resource group this module creates. Defaults to name. |
roleAssignments | array | Additional role assignments to grant on this resource group. |
scaleSetZones | array | Availability zones the scale set spreads across, for example [1, 2, 3]. Empty uses availabilityZone alone. |
tags | object | Tags applied to every resource. |
timeZone | string | Container time zone, for example Europe/Dublin. |
virtualNetworkPeerings | array | VNet peerings in the AVM shape. A remote side is a write outside the relay resource group. Ignored with existingSubnetResourceId. |
vmSize | string | VM size. Avoid burstable (B-series) sizes. |
workspaceResourceId | string | Resource ID of an existing Log Analytics workspace. Empty creates one in the resource group. |
Parameter: graphClientId
Client (application) ID of the Entra app registration: single tenant, no public client flows, and the Mail.Send application permission only, admin-consented. The app registration is a prerequisite: it is a Graph object, not an ARM resource.
- Required: Yes
- Type: string
Parameter: graphClientSecret
Client secret of that app registration. Stored in the appliance Key Vault and written to an env file on the host at boot. Never part of the compose file.
- Required: Yes
- Type: securestring
Parameter: graphSenderMailbox
The mailbox Graph sends as. Every message is sent from this mailbox, whatever the original sender. It must be a real Exchange Online mailbox, shared (no licence needed) or licensed: a user whose licence was removed has no mailbox. Restrict the Entra app to it with an application access policy (see the README prerequisites).
- Required: Yes
- Type: string
Parameter: graphTenantId
Entra tenant ID of the app registration that sends the mail.
- Required: Yes
- Type: string
Parameter: inboundAllowedCidr
CIDR allowed inbound to the relay on port 25: the subnet the hub firewall forwards from. This module opens nothing else.
- Required: Yes
- Type: string
Parameter: mailDomain
The mail domain: Postfix mydomain and myorigin, for example contoso.com.
- Required: Yes
- Type: string
Parameter: myNetworks
Networks allowed to relay, as CIDRs. Used verbatim as Postfix mynetworks: nothing is added, so list loopback yourself if you need it. At least one entry.
Parameter: relayHostname
The name the relay announces: Postfix myhostname and the SMTP banner, for example smtp.contoso.com.
- Required: Yes
- Type: string
Parameter: senderAllowList
Sender addresses (or domain names, which match every address in them) allowed to send through the relay. The Graph mailbox is always allowed. Enforced for every client, trusted networks included. At least one entry.
Parameter: sshPublicKey
SSH public key for the admin account. Password sign-in is disabled.
- Required: Yes
- Type: string
Parameter: existingIdentityPrincipalId
Required if createNewManagedIdentity is false. Principal ID of the existing identity.
- Required: No
- Type: string
- Default:
''
Parameter: existingIdentityResourceId
Required if createNewManagedIdentity is false. Resource ID of the existing identity.
- Required: No
- Type: string
- Default:
''
Parameter: registryToken
Required if containerRegistry.mode is keyVaultToken. A read-only registry token (read:packages) issued to a service identity, never to a person. Stored in the appliance Key Vault as the secret named by containerRegistry.tokenSecretName.
- Required: No
- Type: securestring
- Default:
''
Parameter: vnetAddressPrefix
Required if existingSubnetResourceId is empty. Address space for the relay’s own VNet, for example 10.20.0.0/24.
- Required: No
- Type: string
- Default:
''
Parameter: adminUsername
Local admin username on the hosts.
- Required: No
- Type: string
- Default:
'relayadmin'
Parameter: alertEmailAddresses
Email addresses added to the action group. A service desk mailbox turns each alert into a ticket.
- Required: No
- Type: array
- Default:
[]
Parameter: applianceSubnetNewBits
Prefix length of the appliance subnet, carved as the first subnet of vnetAddressPrefix (27 = a /27, about 26 hosts). Despite the name, this is a prefix length.
- Required: No
- Type: int
- Default:
27
Parameter: availabilityZone
Availability zone for the hosts that are not spread by scaleSetZones.
- Required: No
- Type: int
- Default:
1 - Allowed:
Parameter: businessHoursEndUtc
Business hours end at the start of this hour, UTC, 1 to 24. Weekdays only.
- Required: No
- Type: int
- Default:
17 - MinValue: 1
- MaxValue: 24
First business hour, UTC, 0 to 23.
- Required: No
- Type: int
- Default:
7 - MinValue: 0
- MaxValue: 23
Parameter: containerRegistry
How the hosts pull the relay image. The default is ghcr.io with a read-only token held in the appliance Key Vault (mode keyVaultToken, secret registry-token). The relay image package is private, so the token is needed. Use anonymous only if the package is public, or managedIdentity for an Azure Container Registry.
- Required: No
- Type: object
- Default:
{
mode: 'keyVaultToken'
server: 'ghcr.io'
tokenSecretName: 'registry-token'
}
- MinValue: 0
- MaxValue: 23
Required parameters
| Parameter | Type | Description |
|---|
mode | string | How to authenticate: anonymous, managedIdentity or keyVaultToken. |
server | string | Registry server name, for example contoso.azurecr.io. Empty with mode anonymous. |
Conditional parameters
| Parameter | Type | Description |
|---|
tokenSecretName | string | Required if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token. |
Optional parameters
| Parameter | Type | Description |
|---|
registryResourceId | string | managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it. |
tokenUsername | string | keyVaultToken only: the user name that goes with the token. |
Parameter: containerRegistry.mode
How to authenticate: anonymous, managedIdentity or keyVaultToken.
- Required: Yes
- Type: string
- Allowed:
[
'anonymous'
'keyVaultToken'
'managedIdentity'
]
- MinValue: 0
- MaxValue: 23
Parameter: containerRegistry.server
Registry server name, for example contoso.azurecr.io. Empty with mode anonymous.
- Required: Yes
- Type: string
- MinValue: 0
- MaxValue: 23
Parameter: containerRegistry.tokenSecretName
Required if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token.
- Required: No
- Type: string
- MinValue: 0
- MaxValue: 23
Parameter: containerRegistry.registryResourceId
managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.
- Required: No
- Type: string
- MinValue: 0
- MaxValue: 23
Parameter: containerRegistry.tokenUsername
keyVaultToken only: the user name that goes with the token.
- Required: No
- Type: string
- MinValue: 0
- MaxValue: 23
Parameter: containerRestartAlertThreshold
The container-restart alert fires when the relay container restarts more than this many times in 15 minutes.
- Required: No
- Type: int
- Default:
3 - MinValue: 1
- MaxValue: 23
Parameter: createNatGateway
Create and associate a NAT Gateway for outbound egress. Ignored with existingSubnetResourceId.
- Required: No
- Type: bool
- Default:
True - MinValue: 1
- MaxValue: 23
Parameter: createNewManagedIdentity
Create a new user-assigned identity (true) or attach an existing one (false).
- Required: No
- Type: bool
- Default:
True - MinValue: 1
- MaxValue: 23
Parameter: defaultRouteNextHopIpAddress
Next-hop IP for a 0.0.0.0/0 route on the relay subnet, for example the hub firewall. Ignored with existingSubnetResourceId.
- Required: No
- Type: string
- Default:
'' - MinValue: 1
- MaxValue: 23
Parameter: dnsServers
Custom DNS servers for the relay VNet. Ignored with existingSubnetResourceId.
- Required: No
- Type: array
- Default:
[] - MinValue: 1
- MaxValue: 23
Parameter: drainTimeoutSeconds
Seconds the drain waits for the queue to empty when a host goes away. The appliance gives a drain command 300 seconds, so keep this below that.
- Required: No
- Type: int
- Default:
240 - MinValue: 10
- MaxValue: 280
Parameter: enableKeyVaultPurgeProtection
Purge protection on the Key Vault. Default true; turn off only for throwaway deployments.
- Required: No
- Type: bool
- Default:
True - MinValue: 10
- MaxValue: 280
Parameter: enableNoDeliveryAlert
Alert when no mail was delivered for an hour inside business hours. Turn it off for a relay that legitimately carries no weekday traffic.
- Required: No
- Type: bool
- Default:
True - MinValue: 10
- MaxValue: 280
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True - MinValue: 10
- MaxValue: 280
Parameter: existingSubnetResourceId
Resource ID of an existing, dedicated and empty subnet to place the relay in, instead of creating a VNet. See the container-appliance module for what that subnet must provide.
- Required: No
- Type: string
- Default:
'' - MinValue: 10
- MaxValue: 280
Parameter: graphFailureAlertThreshold
The graph-send-failures alert fires when the relay logs more than this many deferred or rejected Graph sends in 15 minutes.
- Required: No
- Type: int
- Default:
0 - MinValue: 0
- MaxValue: 280
Parameter: hostPrivateIpAddress
Static private IP for the first host. Empty uses the container-appliance default.
- Required: No
- Type: string
- Default:
'' - MinValue: 0
- MaxValue: 280
Parameter: imageReference
The relay container image, <registry>/<repository>@sha256:<digest>. Always pinned by digest: the deployment fails without a 64-character @sha256: digest. The default is the vendor-neutral relay image at the digest built from relay commit 58bf566 (the build publishes the digest as a workflow output).
- Required: No
- Type: string
- Default:
'ghcr.io/innofactororg/smtp-relay@sha256:e63ef9f00fbbc6f5b37c419e5e69a9035c081c91ff76a9d906c3400584e32d14' - MinValue: 0
- MaxValue: 280
Parameter: instanceCount
Number of relay hosts, all active together behind the internal load balancer. Every host takes an address in the subnet.
- Required: No
- Type: int
- Default:
2 - MinValue: 1
- MaxValue: 100
Parameter: itsmWebhookUri
ITSM webhook URI for the action group.
- Required: No
- Type: string
- Default:
'' - MinValue: 1
- MaxValue: 100
Parameter: keyVaultName
Name of the appliance Key Vault. Empty derives it from the name.
- Required: No
- Type: string
- Default:
'' - MinValue: 1
- MaxValue: 100
Parameter: location
Azure region to deploy the resources.
- Required: No
- Type: string
- Default:
'westeurope' - MinValue: 1
- MaxValue: 100
Parameter: lock
A lock to apply to the whole resource group. NOT recommended: it stops Azure Resource Manager grooming deployment history and eventually fails every deployment. Use protectStatefulResources instead.
- Required: No
- Type: object
- MinValue: 1
- MaxValue: 100
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | The lock kind. |
name | string | Name of the lock. |
notes | string | Notes about this lock. |
Parameter: lock.kind
The lock kind.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
- MinValue: 1
- MaxValue: 100
Parameter: lock.name
Name of the lock.
- Required: No
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: lock.notes
Notes about this lock.
- Required: No
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: messageSizeLimitBytes
Largest message the relay accepts, in bytes. Graph rejects a message above its own limit, so keep this at or below it.
- Required: No
- Type: int
- Default:
10240000 - MinValue: 1
- MaxValue: 100
Parameter: name
Short name used to derive every resource name. Lowercase alphanumeric and hyphens, kept short.
- Required: No
- Type: string
- Default:
'smtprelay' - MinValue: 1
- MaxValue: 100
Parameter: protectStatefulResources
CanNotDelete locks on each resource that holds state, instead of on the resource group. See the container-appliance module.
- Required: No
- Type: bool
- Default:
True - MinValue: 1
- MaxValue: 100
Parameter: queuedMailAlertThreshold
The queued-mail alert fires when a host has held more than this many messages for the whole 15-minute window.
- Required: No
- Type: int
- Default:
25 - MinValue: 1
- MaxValue: 100
Parameter: relayHost
Next hop Postfix names as relayhost. Mail is delivered through Graph, so this rarely matters.
- Required: No
- Type: string
- Default:
'smtp.office365.com' - MinValue: 1
- MaxValue: 100
Parameter: relayHostPort
Port of relayHost.
- Required: No
- Type: int
- Default:
587 - MinValue: 1
- MaxValue: 100
Parameter: resourceGroupName
Name of the resource group this module creates. Defaults to name.
- Required: No
- Type: string
- Default:
[parameters('name')] - MinValue: 1
- MaxValue: 100
Parameter: roleAssignments
Additional role assignments to grant on this resource group.
- Required: No
- Type: array
- MinValue: 1
- MaxValue: 100
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the user, group, or service principal to assign the role to. |
roleDefinitionIdOrName | string | The role to assign — either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription). |
Optional parameters
| Parameter | Type | Description |
|---|
principalType | string | The principal type of the assigned principal ID. |
Parameter: roleAssignments.principalId
The principal ID of the user, group, or service principal to assign the role to.
- Required: Yes
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: roleAssignments.roleDefinitionIdOrName
The role to assign — either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription).
- Required: Yes
- Type: string
- MinValue: 1
- MaxValue: 100
Parameter: roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
- MinValue: 1
- MaxValue: 100
Parameter: scaleSetZones
Availability zones the scale set spreads across, for example [1, 2, 3]. Empty uses availabilityZone alone.
- Required: No
- Type: array
- Default:
[] - MinValue: 1
- MaxValue: 100
Tags applied to every resource.
- Required: No
- Type: object
- MinValue: 1
- MaxValue: 100
Parameter: timeZone
Container time zone, for example Europe/Dublin.
- Required: No
- Type: string
- Default:
'UTC' - MinValue: 1
- MaxValue: 100
Parameter: virtualNetworkPeerings
VNet peerings in the AVM shape. A remote side is a write outside the relay resource group. Ignored with existingSubnetResourceId.
- Required: No
- Type: array
- Default:
[] - MinValue: 1
- MaxValue: 100
Parameter: vmSize
VM size. Avoid burstable (B-series) sizes.
- Required: No
- Type: string
- Default:
'Standard_D2as_v5' - MinValue: 1
- MaxValue: 100
Parameter: workspaceResourceId
Resource ID of an existing Log Analytics workspace. Empty creates one in the resource group.
- Required: No
- Type: string
- Default:
'' - MinValue: 1
- MaxValue: 100
Outputs
| Output | Type | Description |
|---|
actionGroupResourceId | string | Resource ID of the action group the alerts notify. |
applianceAddress | string | Address of the internal load balancer. Point the hub firewall DNAT and the internal relay name here. |
applianceSubnetResourceId | string | Resource ID of the relay subnet. |
keyVaultName | string | Name of the appliance Key Vault. |
keyVaultUri | string | URI of the appliance Key Vault. |
loadBalancerResourceId | string | Resource ID of the internal load balancer. |
manualStepsRequiredForReuse | array | Role assignments the template could not make because an existing identity was reused. Empty for a new identity. |
resourceGroupName | string | Name of the resource group. |
scaleSetResourceId | string | Resource ID of the scale set that holds the relay hosts. |
virtualNetworkResourceId | string | Resource ID of the relay VNet. Empty when an existing subnet was used. |
vmIdentityPrincipalId | string | Principal ID of the identity the hosts run as. |
workspaceResourceId | string | Resource ID of the Log Analytics workspace the alerts read. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/ptn/lz/container-appliance:0.2.1 | Remote reference |
br/public:avm/res/insights/scheduled-query-rule:0.5.1 | Remote reference |
Notes
What this module is, and is not
A Postfix relay on N hosts behind an internal load balancer. Applications and appliances on the internal network send plain SMTP to one address; the relay hands each message to Microsoft Graph (sendMail) over HTTPS, as one mailbox, with an Entra app registration’s client secret. It is the SMTP front of Graph for senders that cannot speak OAuth.
It is a two-layer pattern. container-appliance 0.1.0 (in loadBalanced mode) provides the network, the scale set, the identity, the Key Vault, monitoring and generic alerts, and knows nothing about mail. This module adds what only the relay needs: the compose file rendered from parameters, the relay settings, the Graph secret, the drain command and the payload alerts. No file is edited by hand on a host.
Prerequisites this module does not create
- The sender mailbox (
graphSenderMailbox). Every message leaves from this mailbox, whatever the original sender, so recipients see one address. The original sender is only checked against senderAllowList.- It must be a real Exchange Online mailbox: a shared mailbox (no licence needed) or a licensed user. A former licensed user whose licence was removed has no mailbox, and Graph answers
MailboxNotEnabledForRESTAPI. - The relay sends with
saveToSentItems, so a copy of every relayed message accumulates in this mailbox’s Sent Items. Agree a retention policy for it.
- An Entra app registration for Graph. It is a Graph object, not an ARM resource. The values go in
graphTenantId, graphClientId and graphClientSecret.- Single tenant, no redirect URI, and no public client flows. The relay uses the client credentials flow, which needs neither.
- The
Mail.Send application permission only, with admin consent. A test app that reads back and deletes its message also needs Mail.ReadWrite (a Graph delete fails with Mail.Read); a production app never does. - Restrict it to the sender mailbox, so a leaked secret cannot send as anyone else. Until this is done,
Mail.Send reaches every mailbox in the tenant. Existing relays use an Exchange application access policy; Microsoft’s successor is RBAC for Applications in Exchange Online, which needs the same verification.- List the app’s existing policies first (
Get-ApplicationAccessPolicy) and remove stale ones. A RestrictAccess policy scoped to a mailbox that was later deleted leaves the app able to reach nothing. New-ApplicationAccessPolicy -AppId <app> -PolicyScopeGroupId <sender-mailbox> -AccessRight RestrictAccess.- Allow about an hour for propagation.
Test-ApplicationAccessPolicy reports Granted at once, but Graph kept answering 403 ErrorAccessDenied for 62 minutes in the sandbox build. A 403 in that hour is expected; do not change permissions or recreate the policy because of it. - Verify with a client-credentials token, not only with
Test-ApplicationAccessPolicy: a Graph sendMail as the sender mailbox returns 202, and as any other mailbox 403. (An app that also holds a read permission can check GET /users/<mailbox>/mailFolders/inbox instead: 200 and 403.) Deploy the relay only after both answers are right.
- The Exchange Online PowerShell device code (
Connect-ExchangeOnline -Device) expires after 15 minutes, so have the Exchange administrator ready before starting.
- The client secret expires. Put its expiry in a calendar, because the Graph-failures alert is how you would otherwise find out. It goes straight into
graphClientSecret. The module stores it in the appliance Key Vault and writes the host’s runtime env file itself; never put it in a committed file, a ticket or on a workstation.
- A read-only registry token (
registryToken, read:packages) for the private relay image package, issued to a service identity and never to a person. - The hub side, which this module never writes:
- a firewall DNAT rule from the published relay address to the
applianceAddress output (the internal load balancer); - hub return routes for the relay subnet in every hub route table that carries the traffic (the GatewaySubnet and any NVA or route-server subnet), through the
hubReturnRoutes list of the workload-networking module (0.4.11 or later). A half-applied set is the classic cause of asymmetric routing: the TCP connect succeeds and the SMTP banner never arrives. - the subnet’s
inboundAllowedCidr is the source the firewall forwards from. The module opens port 25 from that CIDR and nothing else.
- An egress path for the hosts: the module’s NAT Gateway (default), or your own route through the hub firewall with
defaultRouteNextHopIpAddress or existingSubnetResourceId. The firewall must allow the Docker and Ubuntu repositories, ghcr.io, Entra and Graph (login.microsoftonline.com, graph.microsoft.com) and Azure Key Vault.
How mail flows and what is protected
myNetworks is Postfix mynetworks, used verbatim. A client outside it cannot relay (454 Relay access denied). List loopback yourself if you need it.senderAllowList is enforced for every client, trusted networks included. A sender that is not on it, and is not the Graph mailbox, is refused at RCPT (554).- A message is queued, then sent through Graph. If Graph refuses temporarily (network, token, 5xx, throttling, 401/403/404/408) Postfix defers and retries until the queue lifetime. Other 4xx answers bounce. A failed send never drops mail.
- The queue is on each host’s OS volume: a
loadBalanced host has no data disk. It survives a container restart and a recreate, not the loss of the host. On a scale-in, an update or a shutdown the appliance agent first takes the host out of the load balancer pool and waits out the probe (about 20 seconds), so clients are sent to the other hosts, then runs the drain command (docker exec postfix /scripts/drain.sh). The drain stops intake and waits up to drainTimeoutSeconds until the host is quiet (queue empty, no Graph send in progress, no client connected), then stops Postfix. If Graph is down the drain times out with mail queued and that mail is lost with the host, so do not scale in while the queued-mail alert is firing. A host that dies without a drain loses its queue (ADR 17, ADR 21). - Patching: the scale set hosts are patched by Azure’s automatic guest patching, in health-gated batches, at all hours. There is no patch window. State this to the people who depend on the relay.
Alerts
All notify the appliance action group (itsmWebhookUri, alertEmailAddresses) and auto-mitigate. They read the container logs in Log Analytics; the phrases they match are the relay image’s contract (ADR 18).
| Alert | Fires when | Severity |
|---|
| Relay Queue Backlog | a host’s smallest queue depth over 15 minutes is above queuedMailAlertThreshold | 2 |
| Relay Graph Send Failures | more than graphFailureAlertThreshold deferred or rejected Graph sends in 15 minutes | 1 |
| Relay No Deliveries | no delivery for an hour, hosts reporting, weekdays inside businessHoursStartUtc to businessHoursEndUtc (UTC); switch off with enableNoDeliveryAlert | 3 |
| Container Restarting | the relay container restarts more than containerRestartAlertThreshold times in 15 minutes (from the appliance) | 2 |
There is no connection monitor. “Connected” is not “answering”: the e2e probe checks for the SMTP banner and EHLO, not a TCP connect.
The image
imageReference is ghcr.io/innofactororg/smtp-relay by digest; the deployment fails without a digest (ADR 16). The package is private, so the default containerRegistry is keyVaultToken. To bump the image, take the digest from the relay build, change imageReference and redeploy; hosts roll one at a time through the scale set.
Tests
defaults: one host, own VNet. Through the load balancer address a client VM proves that the relay accepts mail from an allowed sender and refuses a sender that is not on the list, then sends a real message to a sandbox mailbox and proves, from the relay log (delivered via graph service for that queue ID) and then through Graph, that it reached the Inbox. It then deletes every copy of the test message (Inbox, and Sent Items when the sender mailbox is the recipient), requires 204 for each and proves none remain, so the sandbox mailbox ends each run clean. It needs a sandbox Entra app with Mail.Send and Mail.ReadWrite scoped to a sandbox mailbox, in the CI Key Vault as CI-graphTenantId, CI-graphClientId, CI-graphClientSecret and CI-graphTestMailbox. While any is missing the deployment fails at validation and names the parameter. The test is not skipped and nothing is faked.waf-aligned: two hosts, a subnet the test brings, locks and an alert receiver. The client network is not in myNetworks; the test proves the relay answers EHLO and still refuses to relay for it.- Both need
CI-ghcrReadToken for the private image.
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.2.0
Changes
- Builds on
container-appliance 0.2.1 (was 0.1.1). The relay hosts now send their logs to Log Analytics: load-balanced hosts are associated with the data collection rule by policy, which brings the relay’s payload alerts (queue backlog, Graph send failures, no deliveries) and queue depth to life. A scale-in now takes a host out of the load balancer before it drains, so callers no longer see refused connections (ADR 20, ADR 21). - The default relay image is the build of relay commit
58bf566, sha256:e63ef9f00fbbc6f5b37c419e5e69a9035c081c91ff76a9d906c3400584e32d14. Its drain waits until the queue is empty, nothing is being sent and no client is connected, and no longer reads a failed queue check as an empty queue.
Breaking Changes
- Inherited from
container-appliance 0.2.0: the identity that deploys the relay now needs to create a policy assignment and role assignments at the relay’s resource group (see the container-appliance 0.2.0 changelog).
0.1.1
Changes
- Documentation only; the deployed resources are unchanged. The Graph prerequisites in the README and the
graphSenderMailbox and graphClientId descriptions are corrected from a verified sandbox build: the sender must be a real Exchange mailbox (shared or licensed), the app is single tenant with no public client flows and Mail.Send only, stale access policies are removed first, the access policy takes about an hour to reach Graph (a 403 in that hour is expected), and access is verified with a client-credentials token. Sent Items keeps a copy of every relayed message.
Breaking Changes
0.1.0
Changes
- First release of the module. A managed SMTP relay: Postfix on N hosts behind an internal load balancer, delivering mail through Microsoft Graph, with its own network (or a subnet you bring), Key Vault, monitoring and payload alerts. It renders the compose file from parameters and calls
container-appliance 0.1.1 in loadBalanced mode. See the README for parameters and examples. - The relay image is the vendor-neutral
ghcr.io/innofactororg/smtp-relay, pinned by digest. A deployment without a 64-character @sha256: digest fails. The package is private: the default containerRegistry is keyVaultToken with a read-only token you supply (ADR 16). - The queue is on each host’s OS volume, because a
loadBalanced host has no data disk. A drain command runs before a host goes away: it stops intake, flushes the queue, waits and stops Postfix (ADR 17). - Payload alerts from the container logs: queue backlog, Graph send failures, and no deliveries in business hours, plus the appliance’s container-restart alert. There is no connection monitor (ADR 18).
- Inbound is port 25 from
inboundAllowedCidr only. The hub side (a firewall DNAT to the load balancer address, and hub return routes through workload-networking hubReturnRoutes) is a prerequisite the module does not write. - The Graph client secret goes to the appliance Key Vault and reaches the host through an env file. It is never part of the compose file or the deployment history.
- Tests:
defaults (one host, own VNet; SMTP through the load balancer accepts an allowed sender and refuses another, then a real message reaches a sandbox mailbox, proven from the relay log and through Graph) and waf-aligned (two hosts, a subnet you bring, locks, an untrusted client network that is refused). The real-Graph test reads the CI Key Vault secrets CI-graphTenantId, CI-graphClientId, CI-graphClientSecret and CI-graphTestMailbox and fails at validation, naming the parameter, while one is missing.
Breaking Changes
Version history
| Version | Published |
|---|
0.2.0 | 2026-11-24 |
0.1.1 | 2026-11-20 |
0.1.0 | 2026-11-20 |
Azure Subscription Configuration
br/innofactor:avm/ptn/lz/subscription-configuration:0.1.12
Overview
Subscription Configuration Module
This module provides a standardized approach to configuring an Azure subscription with baseline settings to ensure security, governance, and cost management best practices. It simplifies subscription deployment by automating the configuration of key services, ensuring compliance with enterprise standards.
Features Implemented
Default Behavior
By default, the module registers common resource providers, assigns the subscription to a management group, and enables Defender for Cloud with standard settings. Users can optionally enable budget alerts, role assignments, and diagnostic settings.
Customization
The module supports extensive customization through parameters, including:
- Resource Provider Selection: Register only necessary providers.
- Security Settings: Define Defender for Cloud pricing tiers and monitoring exclusions.
- Cost Management: Specify budget thresholds and alert recipients.
- Management Structure: Assign subscriptions to specific management groups.
This module ensures a consistent and repeatable approach to subscription configuration, reducing manual setup effort and enforcing governance policies.
Defender for Cloud
API Security Configuration
The API security settings in Defender for Cloud are managed through two interrelated parameters:
Behavior:
When defenderApiTier is Free, the defenderApiSubPlan setting is ignored and set to null in Azure
// Basic Free Tier (Sub Plan will be ignored)
defenderApiTier: 'Free'
When defenderApiTier is Standard, the defenderApiSubPlan setting defaults to P1 but can be set to any value from P1 to P5
// Standard Tier with P2 plan
defenderApiTier: 'Standard'
defenderApiSubPlan: 'P2'
Quick Start
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/ptn/lz/subscription-configuration' = {
name: 'subscriptionConfiguration'
scope: managementGroup('myManagementGroup')
params: {
name: 'myLandingZone'
partnerCountry: 'norway'
tags: {
Environment: 'Production'
}
}
}
Parameters
| Name | Type | Required | Default | Description |
|---|
budget | budgetType (object) | No | {} | Optional. A budget & alert configuration for the subscription. Default = null. |
defenderAgentlessVmScanningExclusionTags | string | No | "[[{}]" | Conditional. Required if enableAgentlessVmScanning = True. Provide a JSON array of Key Value Pairs defining exceptions for Agentless VM Scanning. |
defenderApiSubPlan | string | No | "P1" | Optional. The sub plan value for API. This can be empty, P1, P2, P3, P4, or P5. |
defenderApiTier | string | No | "Standard" | Optional. The pricing tier value for API. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderAppServicesPricingTier | string | No | "Standard" | Optional. The pricing tier value for AppServices. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderArmPricingTier | string | No | "Standard" | Optional. The pricing tier value for ARM. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderCapGBPerMonthPerStorageAccount | string | No | "5000" | Optional. The monthly cap for malware scanning per storage account - -1 for infinite or at least 10. |
defenderContainersTier | string | No | "Standard" | Optional. The pricing tier value for containers. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderCosmosDbsTier | string | No | "Standard" | Optional. The pricing tier value for CosmosDbs. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderCspmPricingTier | string | No | "Free" | Optional. The pricing tier value for Defender CSPM. - Free or Standard. |
defenderDeviceSecurityGroupProperties | object | No | {} | Optional. Device Security group data. |
defenderEnableAgentlessDiscoveryForKubernetes | string | No | "True" | Optional. Enable zero footprint, API-based discovery of Kubernetes clusters - True or False. |
defenderEnableAgentlessVmScanning | string | No | "False" | Optional. Enable Agentless VM Scanning for VMs. This can be True or False. |
defenderEnableContainerRegistriesVulnerabilityAssessments | string | No | "True" | Optional. Enable vulnerability management for images stored in your container registries - True or False. |
defenderEnableContainerSensor | string | No | "True" | Optional. Enable rich threat detection suite for Kubernetes clusters, nodes, and workloads - True or False. |
defenderEnableEntraPermissionsManagement | string | No | "False" | Optional. Enable CIEM capabilities that helps organizations to manage and control user access and entitlements. This can be True or False. |
defenderEnableFileIntegrityMonitoring | string | No | "False" | Optional. Enable File Integrity Monitoring for VMs. This can be True or False. |
defenderEnableMdeDesignatedSubscription | string | No | "True" | Optional. Enable MdeDesignatedSubscription for VMs. This can be True or False. |
defenderEnableOnUploadMalwareScanning | string | No | "True" | Optional. Enable scanning of uploads to Storage Accounts - True or False. |
defenderEnableSensitiveDataDiscovery | string | No | "True" | Optional. Enable scanning for sensitive data uploaded to Storage Accounts - True or False. |
defenderFileIntegrityMonitoringRules | string | No | "[[{'RuleId':'<guid>','MonitoredEntities':{'WindowsFiles'... | Conditional. Required if enableFileIntegrityMonitoring = True. Provide a JSON array of Key Value Pairs defining rules for File Integrity Monitoring. |
defenderIoTSecuritySolutionProperties | object | No | {} | Optional. Security Solution data. |
defenderKeyVaultsPricingTier | string | No | "Standard" | Optional. The pricing tier value for KeyVaults. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderNotificationEmail | string | No | "" | Optional. Notification e-mail addresses: - comma separated string. |
defenderNotificationPhone | string | No | "" | Optional. Notification phone number. |
defenderNotificationSourcesMinimalRiskLevel | string | No | "Medium" | Optional. Enable notifications or not: - True or False. |
defenderNotificationsRoles | array | No | ["Owner", "Contributor"] | Optional. Which built-in roles should be notified in the event of an issue. Can include Owner, Controbutor, ServiceAdmin, or AccountAdmin. |
defenderNotificationsSourcesMinimalSeverity | string | No | "Medium" | Optional. The threshold for security alerts: - High, Medium, or Low. |
defenderOpenSourceRelationalDatabasesTier | string | No | "Standard" | Optional. The pricing tier value for OpenSourceRelationalDatabases. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderScope | string | No | "[subscription().id]" | Optional. All the VMs in this scope will send their security data to the mentioned workspace unless overridden by a setting with more specific scope. |
defenderSqlServerVirtualMachinesPricingTier | string | No | "Standard" | Optional. The pricing tier value for SqlServerVirtualMachines. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderSqlServersPricingTier | string | No | "Standard" | Optional. The pricing tier value for SqlServers. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderStorageAccountsPricingTier | string | No | "Standard" | Optional. The pricing tier value for StorageAccounts. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderVirtualMachinesPricingTier | string | No | "Standard" | Optional. The pricing tier value for VMs. Azure Security Center is provided in two pricing tiers: free and standard, with the standard tier available with a trial period. The standard tier offers advanced security capabilities, while the free tier offers basic security features. - Free or Standard. |
defenderVirtualMachinesSubPlan | string | No | "P1" | Optional. The sub plan value for VMs. This can be empty, P1 or P2. |
defenderWorkspaceResourceId | string | No | "" | Optional. The full resource Id of the Log Analytics workspace to save the data in. |
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
location | string | No | "[deployment().location]" | Optional. Location for all Resources. |
name | string | No | "" | Optional. Name of the pattern to create. Default is lowercase subscription.displayName. |
partnerCountry | string | No | "norway" | Optional. The Partner ID for partner attribution. Default = Norway. |
resourceProvidersList | array | No | ["Microsoft.ApiManagement", "Microsoft.AppPlatform", "Mic... | Optional. An object of resource providers and resource providers features to register. If left blank/empty, no resource providers will be registered. |
tags | object | No | {} | Optional. Tags of the resource. |
Outputs
| Name | Type | Description |
|---|
provisioningRgLocation | string | The location where the provisioning resources were deployed. |
provisioningRgName | string | The Resource Group name that was created for provisioning resources. |
registeredResourceProviders | array | An array of resource providers that were registered in this deployment. |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|
0.1.12 | 2025-04-16 |
0.1.11 | 2025-04-01 |
0.1.10 | 2025-03-31 |
0.1.9 | 2025-03-16 |
0.1.8 | 2025-03-01 |
0.1.7 | 2025-02-25 |
0.1.6 | 2025-02-16 |
0.1.5 | 2025-02-12 |
Partner Attribuation
br/innofactor:avm/ptn/management/partner:0.1.1
README
partner [Management/Partner]
Apply Partner Attribution
This module will apply Partner Attribution for the deploymenent.
Navigation
Usage Example
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
// Create a Resource Group which we will use to host the Identiies and Deployment Scripts
module resourceGroup 'br/public:avm/res/resources/resource-group:0.4.1' = {
name: '${uniqueString(deployment().name, resourceLocation)}-registerProvidersRG'
scope: subscription(subscriptionId)
params: {
location: resourceLocation
name: resourceGroupName
tags: {
Role: 'Subscription configuration'
}
}
}
// Deploy the module to register the resource providers
module partner 'br/innofactor:avm/ptn/management/partner' = {
name: '${uniqueString(deployment().name, resourceLocation)}-registerProviders'
params: {
name: '${resourceGroup.outputs.name}-rp'
location: resourceLocation
}
}
Resource Types
None
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/management/partner:<version>.
Example 1:
Module Test Title
Usage Example
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/ptn/lz/subscription-configuration' = {
name: 'subscriptionConfiguration'
scope: managementGroup('myManagementGroup')
params: {
partnerCountry: 'norway'
}
}
via Bicep module
module partner 'br/innofactor:avm/ptn/management/partner:<version>' = {
name: 'partnerDeployment'
params: {
partnerCountry: 'norway'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"partnerCountry": {
"value": "norway"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/management/partner:<version>'
param partnerCountry = 'norway'
Parameters
Optional parameters
| Parameter | Type | Description |
|---|
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
location | string | Location for all Resources. |
partnerCountry | string | The Partner ID for partner attribution. Default = Norway. |
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[deployment().location]
Parameter: partnerCountry
The Partner ID for partner attribution. Default = Norway.
- Required: No
- Type: string
- Default:
'norway' - Allowed:
[
'denmark'
'finland'
'norway'
'sweden'
]
Outputs
None
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/ptn/management/partner | Remote reference |
br/public:avm/res/resources/resource-group:0.4.1 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.1.1
Changes
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
0.1.0
Changes
- Adding initial spoke configuration with sub patterns (#89)
Breaking Changes
Version history
| Version | Published |
|---|
0.1.1 | 2026-11-16 |
0.1.0 | 2025-02-04 |
Register Resource Providers
br/innofactor:avm/ptn/management/register-providers:0.1.12
README
register-providers [Management/RegisterProviders]
Register Resource Providers
This module will register resource providers in a subscription based on the list provided.
A managed identity is created and granted privileges to run the registration process.
Navigation
Usage Example
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
param resourceProvidersList array = [
'Microsoft.Automation'
]
// Create a Resource Group which we will use to host the Identiies and Deployment Scripts
module resourceGroup 'br/public:avm/res/resources/resource-group:0.4.1' = {
name: '${uniqueString(deployment().name, resourceLocation)}-registerProvidersRG'
scope: subscription(subscriptionId)
params: {
location: resourceLocation
name: resourceGroupName
tags: {
Role: 'Subscription configuration'
}
}
}
// Deploy the module to register the resource providers
module registerProviders 'br/innofactor:avm/ptn/management/register-providers' = {
name: '${uniqueString(deployment().name, resourceLocation)}-registerProviders'
params: {
name: '${resourceGroup.outputs.name}-rp'
location: resourceLocation
subscriptionId: subscriptionId
resourceProvidersList: resourceProvidersList
deploymentResourceGroupName: resourceGroup.outputs.name
}
}
Resource Types
| Resource Type | API Version |
|---|
Microsoft.Authorization/locks | 2020-05-01 |
Microsoft.Authorization/roleAssignments | 2022-04-01 |
Microsoft.ManagedIdentity/userAssignedIdentities | 2023-01-31 |
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials | 2023-01-31 |
Microsoft.Resources/deploymentScripts | 2023-08-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/management/register-providers:<version>.
Example 1: Using only defaults
Default Resister Resource Providers Test
Usage Example
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/ptn/lz/subscription-configuration' = {
name: 'subscriptionConfiguration'
scope: managementGroup('myManagementGroup')
params: {
location: resourceLocation
tags: {
Environment: 'Production'
}
resourceProvidersList: ['Microsoft.Compute'']
}
}
}
via Bicep module
module registerProviders 'br/innofactor:avm/ptn/management/register-providers:<version>' = {
name: 'registerProvidersDeployment'
params: {
location: '<location>'
resourceProvidersList: '<resourceProvidersList>'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"value": "<location>"
},
"resourceProvidersList": {
"value": "<resourceProvidersList>"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/management/register-providers:<version>'
param location = '<location>'
param resourceProvidersList = '<resourceProvidersList>'
Parameters
Conditional parameters
| Parameter | Type | Description |
|---|
managedIdentities | object | The managed identity definition for this resource. Required if assignRbacRole is true and managedIdentityName is null. |
managedIdentityName | string | Name of the Managed Identity resource to create. Required if assignRbacRole is true and managedIdentities is null. Defaults to id-ContainerRegistryImport. |
Optional parameters
| Parameter | Type | Description |
|---|
assignRbacRole | bool | If set, the Contributor role will be granted to the managed identity (passed by the managedIdentities parameter or create with the name specified in parameter managedIdentityName), which is needed to import images into the Azure Container Registry. Defaults to true. |
cleanupPreference | string | When the script resource is cleaned up. Default is OnExpiration and the cleanup time is after 1h. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
location | string | Location for all Resources. |
resourceProvidersList | array | An object of resource providers and resource providers features to register. If left blank/empty, no resource providers will be registered. |
runOnce | bool | How the deployment script should be forced to execute. Default is to force the script to deploy the image to run every time. |
tags | object | Tags of the resource. |
Parameter: managedIdentities
The managed identity definition for this resource. Required if assignRbacRole is true and managedIdentityName is null.
Optional parameters
| Parameter | Type | Description |
|---|
userAssignedResourceIds | array | The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption. |
Parameter: managedIdentities.userAssignedResourceIds
The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption.
Parameter: managedIdentityName
Name of the Managed Identity resource to create. Required if assignRbacRole is true and managedIdentities is null. Defaults to id-ContainerRegistryImport.
Parameter: assignRbacRole
If set, the Contributor role will be granted to the managed identity (passed by the managedIdentities parameter or create with the name specified in parameter managedIdentityName), which is needed to import images into the Azure Container Registry. Defaults to true.
- Required: No
- Type: bool
- Default:
True
Parameter: cleanupPreference
When the script resource is cleaned up. Default is OnExpiration and the cleanup time is after 1h.
- Required: No
- Type: string
- Default:
'OnExpiration' - Allowed:
[
'Always'
'OnExpiration'
'OnSuccess'
]
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[resourceGroup().location]
Parameter: resourceProvidersList
An object of resource providers and resource providers features to register. If left blank/empty, no resource providers will be registered.
- Required: No
- Type: array
- Default:
[
'Microsoft.Compute'
'Microsoft.CostManagement'
'Microsoft.KeyVault'
'Microsoft.Storage'
'Microsoft.Web'
]
Parameter: runOnce
How the deployment script should be forced to execute. Default is to force the script to deploy the image to run every time.
- Required: No
- Type: bool
- Default:
False
Tags of the resource.
- Required: No
- Type: object
- Default:
{} - Example:
{
"key1": "value1"
"key2": "value2"
}
Outputs
| Output | Type | Description |
|---|
deploymentScriptLogs | array | Output logs for the registration status. |
deploymentScriptOutput | object | Output Object for the registration status. |
resourceGroupName | string | Output name of the resource. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/ptn/management/register-providers | Remote reference |
br/public:avm/res/managed-identity/user-assigned-identity:0.4.0 | Remote reference |
br/public:avm/res/resources/deployment-script:0.5.0 | Remote reference |
br/public:avm/res/resources/resource-group:0.4.1 | Remote reference |
br/public:avm/utl/types/avm-common-types:0.2.1 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.1.12
Changes
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
0.1.11
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.10
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.9
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.8
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.7
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.6
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.5
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.4
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.3
Changes
- Dependency on Subscription Placement blocking publish (#116)
Breaking Changes
0.1.2
Changes
- Name default value calculation (#113)
- Subscription configuration resource and budgets (#110)
Breaking Changes
0.1.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.0
Changes
- 85 avm module issue register providers (#86)
- Update main.bicep
- Register-Providers telemetry location not needed (#84)
- Add register-providers (#81)
Breaking Changes
Version history
| Version | Published |
|---|
0.1.12 | 2026-11-16 |
0.1.11 | 2025-05-16 |
0.1.10 | 2025-05-01 |
0.1.9 | 2025-04-16 |
0.1.8 | 2025-04-01 |
0.1.7 | 2025-03-31 |
0.1.6 | 2025-03-16 |
0.1.5 | 2025-03-01 |
0.1.4 | 2025-02-16 |
0.1.3 | 2025-02-12 |
0.1.2 | 2025-02-12 |
0.1.1 | 2025-02-01 |
0.1.0 | 2025-01-31 |
Azure Subscription Placement
br/innofactor:avm/ptn/management/subscription-placement:0.1.9
README
subscription-placement [Management/SubscriptionPlacement]
Subscription Placement Module
This module automates the placement of Azure subscriptions into management groups, ensuring a structured and governed hierarchy within an enterprise environment. By using this module, organizations can enforce compliance, security policies, and streamlined management of subscriptions at scale.
Navigation
Features Implemented
Default Behavior
By default, the module:
- Assigns subscriptions to specified management groups as per the provided input.
- Uses the deployment location for tracking and logging.
- Enables telemetry for usage monitoring unless explicitly disabled.
Customization
The module allows extensive customization via parameters:
- Management Group ID: Define the target management groups where subscriptions will be placed.
- Subscription IDs: Provide a list of subscriptions to assign to each management group.
- Location: Set the deployment location (default is the current deployment region).
- Telemetry Enablement: Opt in or out of module usage telemetry.
This module simplifies the process of structuring subscriptions under a management group hierarchy, improving governance, security, and operational consistency.
Quick Start
To use the module in your deployment, include the following snippet in your Bicep file:
module subscriptionPlacement 'br/innofactor:avm/ptn/lz/subscription-placement' = {
name: 'subscriptionPlacement'
scope: tenant()
params: {
subscriptionPlacements: [
{
managementGroupId: 'myManagementGroup'
subscriptionIds: ['00000000-0000-0000-0000-000000000000']
}
]
enableTelemetry: true
}
}
Resource Types
| Resource Type | API Version |
|---|
Microsoft.Management/managementGroups/subscriptions | 2021-04-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/management/subscription-placement:<version>.
Example 1: Using only defaults.
This instance deploys the module with the minimum set of required parameters.
via Bicep module
module subscriptionPlacement 'br/innofactor:avm/ptn/management/subscription-placement:<version>' = {
name: 'subscriptionPlacementDeployment'
params: {
subscriptionPlacements: [
{
managementGroupId: '<managementGroupId>'
subscriptionIds: [
'<subscriptionId>'
]
}
]
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"subscriptionPlacements": {
"value": [
{
"managementGroupId": "<managementGroupId>",
"subscriptionIds": [
"<subscriptionId>"
]
}
]
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/management/subscription-placement:<version>'
param subscriptionPlacements = [
{
managementGroupId: '<managementGroupId>'
subscriptionIds: [
'<subscriptionId>'
]
}
]
Parameters
Required parameters
| Parameter | Type | Description |
|---|
subscriptionPlacements | array | The management group IDs along with the subscriptions to be placed underneath them. |
Optional parameters
| Parameter | Type | Description |
|---|
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
location | string | Location for all Resources. |
Parameter: subscriptionPlacements
The management group IDs along with the subscriptions to be placed underneath them.
Required parameters
| Parameter | Type | Description |
|---|
managementGroupId | string | The unique identifier of the target management group where subscriptions are to be placed. |
subscriptionIds | array | A list of subscription IDs that are to be assigned to the specified management group. |
Parameter: subscriptionPlacements.managementGroupId
The unique identifier of the target management group where subscriptions are to be placed.
- Required: Yes
- Type: string
Parameter: subscriptionPlacements.subscriptionIds
A list of subscription IDs that are to be assigned to the specified management group.
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[deployment().location]
Outputs
| Output | Type | Description |
|---|
subscriptionPlacementSummary | string | Output of number of management groups that have been configured with subscription placements. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/ptn/lz/subscription-placement | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.1.9
Changes
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
0.1.8
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.7
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.6
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.5
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.4
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.3
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.2
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.0
Changes
- Updates to Subscription Placement (#118)
Breaking Changes
Version history
| Version | Published |
|---|
0.1.9 | 2026-11-16 |
0.1.8 | 2025-05-16 |
0.1.7 | 2025-05-01 |
0.1.6 | 2025-04-16 |
0.1.5 | 2025-04-01 |
0.1.4 | 2025-03-31 |
0.1.3 | 2025-03-16 |
0.1.2 | 2025-03-01 |
0.1.1 | 2025-02-16 |
0.1.0 | 2025-02-12 |
Spoke Networking
br/innofactor:avm/ptn/network/spoke-networking:0.4.0
Overview
Workload Network Configuration Module
This module deploys a workload virtual network with associated resources, providing a standardized approach to configuring network infrastructure for workload environments. It simplifies the deployment process by automating the setup of key networking components and ensuring best practices for security and connectivity.
Features Implemented
Default Behavior
By default, the module creates a virtual network with the address space defaulted to ‘10.0.10.0/24’.
There will be no subnets, peering or route tables. Network Watcher and diagnostics are enabled for comprehensive monitoring.
Customization
The module supports extensive customization through parameters, including:
- Virtual Network and subnet address spaces
- NSG rules and route table entries
- Peering configurations
- Azure Firewall rule collections
- Diagnostic and monitoring settings
This module ensures a consistent and secure approach to deploying workload networking infrastructure, reducing manual configuration efforts and enforcing organizational standards.
Quick Start
To use this module, provide the necessary parameters such as name, location, and virtual network configuration. The module will handle the deployment and configuration of all associated networking resources.
module workloadNetwork 'br/public:avm/ptn/network/spoke-networking:<version>' = {
name: 'workloadNetworkDeployment'
params: {
name: 'myWorkload'
location: 'eastus'
vnetConfig: {
addressPrefixes: ['10.0.0.0/16']
subnets: [
{
name: 'subnet1'
addressPrefix: '10.0.1.0/24'
}
]
}
}
}
This deployment will create a basic workload network setup, which can be further customized as needed.
Parameters
| Name | Type | Required | Default | Description |
|---|
addressPrefixes | array | Yes | | Required. An Array of 1 or more IP Address Prefixes for the Virtual Network. |
azureFirewallRulesCollectionGroup | object | No | {} | Optional. Create an Azure Firewall Policy Rules Collection Group. |
connectionMonitors | array | No | [] | Optional. Array that contains the Connection Monitors. |
ddosProtectionPlanResourceId | string | No | | Optional. Resource ID of the DDoS protection plan to assign the VNET to. If it’s left blank, DDoS protection will not be configured. If it’s provided, the VNET created by this template will be attached to the referenced DDoS protection plan. The DDoS protection plan can exist in the same or in a different subscription. |
diagnosticsStorage | monitoringStorageType (object) | No | {} | Optional. Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty. |
disableBgpRoutePropagation | bool | No | false | Optional. Switch to disable BGP route propagation. |
dnsServers | array | No | | Optional. DNS Servers associated to the Virtual Network. |
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
enableVmProtection | bool | No | | Optional. Indicates if VM protection is enabled for all the subnets in the virtual network. |
flowLogs | array | No | [] | Optional. Array that contains the Flow Logs. |
flowTimeoutInMinutes | int | No | 0 | Optional. The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. Default value 0 will set the property to null. |
hubRoutes | routeConfigArrayType (array) | No | [] | Optional. An array of routes to add to the hub Virtual Network. Each route has a name and an array of routes. The Name for this route must be the resource ID of the target route table. |
location | string | No | "[deployment().location]" | Optional. Location for all resources. |
lock | lockType (object) | No | | Optional. The lock settings of the service. |
name | string | No | "[format('NetworkWatcher_{0}', parameters('location'))]" | Optional. Name of the Network Watcher resource (hidden). |
networkSecurityGroups | nsgConfigArrayType (array) | No | [] | Optional. An array of Network Security Groups to add to the Virtual Network. Each NSG has a name and an array of rules. The Name for this NSG Group should match the subnet name to be automatically associated. |
partnerCountry | string | No | "norway" | Optional. The Partner ID for partner attribution. |
peerings | array | No | | Optional. Virtual Network Peering configurations. |
roleAssignments | roleAssignmentType (array) | No | | Optional. Array of role assignments to create. |
routes | routeConfigArrayType (array) | No | [] | Optional. An array of routes to add to the Virtual Network. Each route has a name and an array of routes. The Name for this route should match the subnet name to be automatically associated. |
subnets | array | No | | Optional. An Array of subnets to deploy to the Virtual Network. |
tags | object | No | | Optional. Tags of the resource. |
vnetEncryption | bool | No | false | Optional. Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. Requires the EnableVNetEncryption feature to be registered for the subscription and a supported region to use this property. |
vnetEncryptionEnforcement | string | No | "AllowUnencrypted" | Optional. If the encrypted VNet allows VM that does not support encryption. Can only be used when vnetEncryption is enabled. |
Outputs
| Name | Type | Description |
|---|
networkResourceGroupResourceId | string | The resource ID of the deployed virtual network. |
networkWatcherLocation | string | The location the resource was deployed into. |
networkWatcherResourceGroupId | string | The resource group ID of the deployed network watcher. |
networkWatcherResourceGroupName | string | The resource group the network watcher was deployed into. |
networkWatcherResourceId | string | The resource ID of the deployed network watcher. |
networkWatchername | string | The name of the deployed network watcher. |
nsgNames | array | The name of the route table. |
nsgNamesList | array | The names of all Routes provided. |
nsgResourceIds | array | The resource ID of the route table. |
routeNamesList | array | The names of all Routes provided. |
routeTableNames | array | The name of the route table. |
routeTableResourceIds | array | The resource ID of the route table. |
subnetNames | array | The names of the deployed subnets. |
subnetResourceIds | array | The resource IDs of the deployed subnets. |
virtualNetworkName | string | The name of the virtual network. |
virtualNetworkResourceIds | string | The resource IDs of the deployed virtual network. |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|
0.4.0 | 2025-02-26 |
Workload Network Configuration
br/innofactor:avm/ptn/network/workload-networking:0.4.11
README
WorkloadNetwork [Network/WorkloadNetworking]
Workload Network Configuration Module
This module deploys a workload virtual network with associated resources, providing a standardized approach to configuring network infrastructure for workload environments. It simplifies the deployment process by automating the setup of key networking components and ensuring best practices for security and connectivity.
Navigation
Features Implemented
Default Behavior
By default, the module creates a virtual network with the address space defaulted to ‘10.0.10.0/24’.
There will be no subnets, peering or route tables. Network Watcher and diagnostics are enabled for comprehensive monitoring.
Customization
The module supports extensive customization through parameters, including:
- Virtual Network and subnet address spaces
- NSG rules and route table entries
- Peering configurations
- Azure Firewall rule collections
- Diagnostic and monitoring settings
This module ensures a consistent and secure approach to deploying workload networking infrastructure, reducing manual configuration efforts and enforcing organizational standards.
Quick Start
To use this module, provide the necessary parameters such as name, location, and virtual network configuration. The module will handle the deployment and configuration of all associated networking resources.
module workloadNetwork 'br/public:avm/ptn/network/spoke-networking:<version>' = {
name: 'workloadNetworkDeployment'
params: {
name: 'myWorkload'
location: 'eastus'
vnetConfig: {
addressPrefixes: ['10.0.0.0/16']
subnets: [
{
name: 'subnet1'
addressPrefix: '10.0.1.0/24'
}
]
}
}
}
This deployment will create a basic workload network setup, which can be further customized as needed.
Resource Types
| Resource Type | API Version |
|---|
Microsoft.Authorization/locks | 2020-05-01 |
Microsoft.Authorization/roleAssignments | 2022-04-01 |
Microsoft.Insights/diagnosticSettings | 2021-05-01-preview |
Microsoft.KeyVault/vaults/secrets | 2023-07-01 |
Microsoft.Network/firewallPolicies/ruleCollectionGroups | 2024-05-01 |
Microsoft.Network/networkSecurityGroups | 2023-11-01 |
Microsoft.Network/networkWatchers | 2024-05-01 |
Microsoft.Network/networkWatchers/connectionMonitors | 2024-05-01 |
Microsoft.Network/networkWatchers/flowLogs | 2024-05-01 |
Microsoft.Network/privateEndpoints | 2024-05-01 |
Microsoft.Network/privateEndpoints/privateDnsZoneGroups | 2024-05-01 |
Microsoft.Network/routeTables | 2023-04-01 |
Microsoft.Network/routeTables/routes | 2024-05-01 |
Microsoft.Network/virtualNetworks | 2024-05-01 |
Microsoft.Network/virtualNetworks/subnets | 2024-05-01 |
Microsoft.Network/virtualNetworks/virtualNetworkPeerings | 2024-01-01 |
Microsoft.Resources/resourceGroups | 2025-03-01 |
Microsoft.Storage/storageAccounts | 2024-01-01 |
Microsoft.Storage/storageAccounts/blobServices | 2024-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers | 2024-01-01 |
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies | 2024-01-01 |
Microsoft.Storage/storageAccounts/fileServices | 2024-01-01 |
Microsoft.Storage/storageAccounts/fileServices/shares | 2024-01-01 |
Microsoft.Storage/storageAccounts/localUsers | 2024-01-01 |
Microsoft.Storage/storageAccounts/managementPolicies | 2024-01-01 |
Microsoft.Storage/storageAccounts/queueServices | 2024-01-01 |
Microsoft.Storage/storageAccounts/queueServices/queues | 2024-01-01 |
Microsoft.Storage/storageAccounts/tableServices | 2024-01-01 |
Microsoft.Storage/storageAccounts/tableServices/tables | 2024-01-01 |
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/ptn/network/workload-networking:<version>.
Example 1: Workload Network with default parameters
This module deploys a workload virtual network using default settings.
We configure the Virtual Network, with the address space of 10.0.10.0/24, and two subnets:
| Subnet Name | Address Space | Service Endpoints | Route Table | NSG | Private Endpoint Network Policies | Private Link Service Network Policies |
|---|
subnet1 | 10.0.10.0/26 | None | Yes | Yes | Disabled | Disabled |
subnet2 | 10.0.10.64/26 | None | Yes | Yes | Disabled | Disabled |
We also configure User Defined Routes (UDRs) for each subnet to route all traffic to a Virtual Appliance at 10.0.1.4.
Finally, we configure Network Security Groups (NSGs) for each subnet with the following rules:
| Subnet Name | Rule Name | Description | Access | Direction | Priority | Protocol | Source Port Range | Source Address Prefix | Destination Port Range | Destination Address Prefix |
|---|
subnet1 | AllowLoadBalancerHealthInbound | Allow inbound Azure Load Balancer health check. | Allow | Inbound | 100 | * | * | AzureLoadBalancer | * | * |
subnet1 | DenyAllInbound | Default rule to deny all inbound traffic | Deny | Inbound | 4000 | * | * | * | * | * |
subnet1 | DenyTraversalOutbound | Deny outbound double hop traversal. | Deny | Outbound | 200 | Tcp | * | VirtualNetwork | 3389, 22 | * |
subnet2 | AllowLoadBalancerHealthInbound | Allow inbound Azure Load Balancer health check. | Allow | Inbound | 100 | * | * | AzureLoadBalancer | * | * |
subnet2 | DenyAllInbound | Default rule to deny all inbound traffic | Deny | Inbound | 4000 | * | * | * | * | * |
subnet2 | DenyTraversalOutbound | Deny outbound double hop traversal. | Deny | Outbound | 200 | Tcp | * | VirtualNetwork | 3389, 22 | * |
via Bicep module
module workloadNetworking 'br/innofactor:avm/ptn/network/workload-networking:<version>' = {
name: 'workloadNetworkingDeployment'
params: {
// Required parameters
addressPrefixes: [
'10.0.10.0/24'
]
// Non-required parameters
location: '<location>'
name: 'p-we1elmera'
networkSecurityGroups: [
{
name: 'subnet1'
securityRules: [
{
name: 'AllowLoadBalancerHealthInbound'
properties: {
access: 'Allow'
description: 'Allow inbound Azure Load Balancer health check.'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 100
protocol: '*'
sourceAddressPrefix: 'AzureLoadBalancer'
sourcePortRange: '*'
}
}
{
name: 'DenyAllInbound'
properties: {
access: 'Deny'
description: 'Default rule to deny all inbound traffic'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 4000
protocol: '*'
sourceAddressPrefix: '*'
sourcePortRange: '*'
}
}
{
name: 'DenyTraversalOutbound'
properties: {
access: 'Deny'
description: 'Deny outbound double hop traversal.'
destinationAddressPrefix: '*'
destinationPortRanges: [
'22'
'3389'
]
direction: 'Outbound'
priority: 200
protocol: 'Tcp'
sourceAddressPrefix: 'VirtualNetwork'
sourcePortRange: '*'
}
}
]
}
{
name: 'subnet2'
securityRules: [
{
name: 'AllowLoadBalancerHealthInbound'
properties: {
access: 'Allow'
description: 'Allow inbound Azure Load Balancer health check.'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 100
protocol: '*'
sourceAddressPrefix: 'AzureLoadBalancer'
sourcePortRange: '*'
}
}
{
name: 'DenyAllInbound'
properties: {
access: 'Deny'
description: 'Default rule to deny all inbound traffic'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 4000
protocol: '*'
sourceAddressPrefix: '*'
sourcePortRange: '*'
}
}
{
name: 'DenyTraversalOutbound'
properties: {
access: 'Deny'
description: 'Deny outbound double hop traversal.'
destinationAddressPrefix: '*'
destinationPortRanges: [
'22'
'3389'
]
direction: 'Outbound'
priority: 200
protocol: 'Tcp'
sourceAddressPrefix: 'VirtualNetwork'
sourcePortRange: '*'
}
}
]
}
]
subnets: [
{
addressPrefix: '10.0.10.0/26'
name: 'subnet1'
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Disabled'
serviceEndpoints: []
}
{
addressPrefix: '10.0.10.64/26'
name: 'subnet2'
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Disabled'
serviceEndpoints: []
}
]
useLegacyNetworkWatcherDeployment: true
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"addressPrefixes": {
"value": [
"10.0.10.0/24"
]
},
// Non-required parameters
"location": {
"value": "<location>"
},
"name": {
"value": "p-we1elmera"
},
"networkSecurityGroups": {
"value": [
{
"name": "subnet1",
"securityRules": [
{
"name": "AllowLoadBalancerHealthInbound",
"properties": {
"access": "Allow",
"description": "Allow inbound Azure Load Balancer health check.",
"destinationAddressPrefix": "*",
"destinationPortRange": "*",
"direction": "Inbound",
"priority": 100,
"protocol": "*",
"sourceAddressPrefix": "AzureLoadBalancer",
"sourcePortRange": "*"
}
},
{
"name": "DenyAllInbound",
"properties": {
"access": "Deny",
"description": "Default rule to deny all inbound traffic",
"destinationAddressPrefix": "*",
"destinationPortRange": "*",
"direction": "Inbound",
"priority": 4000,
"protocol": "*",
"sourceAddressPrefix": "*",
"sourcePortRange": "*"
}
},
{
"name": "DenyTraversalOutbound",
"properties": {
"access": "Deny",
"description": "Deny outbound double hop traversal.",
"destinationAddressPrefix": "*",
"destinationPortRanges": [
"22",
"3389"
],
"direction": "Outbound",
"priority": 200,
"protocol": "Tcp",
"sourceAddressPrefix": "VirtualNetwork",
"sourcePortRange": "*"
}
}
]
},
{
"name": "subnet2",
"securityRules": [
{
"name": "AllowLoadBalancerHealthInbound",
"properties": {
"access": "Allow",
"description": "Allow inbound Azure Load Balancer health check.",
"destinationAddressPrefix": "*",
"destinationPortRange": "*",
"direction": "Inbound",
"priority": 100,
"protocol": "*",
"sourceAddressPrefix": "AzureLoadBalancer",
"sourcePortRange": "*"
}
},
{
"name": "DenyAllInbound",
"properties": {
"access": "Deny",
"description": "Default rule to deny all inbound traffic",
"destinationAddressPrefix": "*",
"destinationPortRange": "*",
"direction": "Inbound",
"priority": 4000,
"protocol": "*",
"sourceAddressPrefix": "*",
"sourcePortRange": "*"
}
},
{
"name": "DenyTraversalOutbound",
"properties": {
"access": "Deny",
"description": "Deny outbound double hop traversal.",
"destinationAddressPrefix": "*",
"destinationPortRanges": [
"22",
"3389"
],
"direction": "Outbound",
"priority": 200,
"protocol": "Tcp",
"sourceAddressPrefix": "VirtualNetwork",
"sourcePortRange": "*"
}
}
]
}
]
},
"subnets": {
"value": [
{
"addressPrefix": "10.0.10.0/26",
"name": "subnet1",
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Disabled",
"serviceEndpoints": []
},
{
"addressPrefix": "10.0.10.64/26",
"name": "subnet2",
"privateEndpointNetworkPolicies": "Disabled",
"privateLinkServiceNetworkPolicies": "Disabled",
"serviceEndpoints": []
}
]
},
"useLegacyNetworkWatcherDeployment": {
"value": true
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/network/workload-networking:<version>'
// Required parameters
param addressPrefixes = [
'10.0.10.0/24'
]
// Non-required parameters
param location = '<location>'
param name = 'p-we1elmera'
param networkSecurityGroups = [
{
name: 'subnet1'
securityRules: [
{
name: 'AllowLoadBalancerHealthInbound'
properties: {
access: 'Allow'
description: 'Allow inbound Azure Load Balancer health check.'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 100
protocol: '*'
sourceAddressPrefix: 'AzureLoadBalancer'
sourcePortRange: '*'
}
}
{
name: 'DenyAllInbound'
properties: {
access: 'Deny'
description: 'Default rule to deny all inbound traffic'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 4000
protocol: '*'
sourceAddressPrefix: '*'
sourcePortRange: '*'
}
}
{
name: 'DenyTraversalOutbound'
properties: {
access: 'Deny'
description: 'Deny outbound double hop traversal.'
destinationAddressPrefix: '*'
destinationPortRanges: [
'22'
'3389'
]
direction: 'Outbound'
priority: 200
protocol: 'Tcp'
sourceAddressPrefix: 'VirtualNetwork'
sourcePortRange: '*'
}
}
]
}
{
name: 'subnet2'
securityRules: [
{
name: 'AllowLoadBalancerHealthInbound'
properties: {
access: 'Allow'
description: 'Allow inbound Azure Load Balancer health check.'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 100
protocol: '*'
sourceAddressPrefix: 'AzureLoadBalancer'
sourcePortRange: '*'
}
}
{
name: 'DenyAllInbound'
properties: {
access: 'Deny'
description: 'Default rule to deny all inbound traffic'
destinationAddressPrefix: '*'
destinationPortRange: '*'
direction: 'Inbound'
priority: 4000
protocol: '*'
sourceAddressPrefix: '*'
sourcePortRange: '*'
}
}
{
name: 'DenyTraversalOutbound'
properties: {
access: 'Deny'
description: 'Deny outbound double hop traversal.'
destinationAddressPrefix: '*'
destinationPortRanges: [
'22'
'3389'
]
direction: 'Outbound'
priority: 200
protocol: 'Tcp'
sourceAddressPrefix: 'VirtualNetwork'
sourcePortRange: '*'
}
}
]
}
]
param subnets = [
{
addressPrefix: '10.0.10.0/26'
name: 'subnet1'
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Disabled'
serviceEndpoints: []
}
{
addressPrefix: '10.0.10.64/26'
name: 'subnet2'
privateEndpointNetworkPolicies: 'Disabled'
privateLinkServiceNetworkPolicies: 'Disabled'
serviceEndpoints: []
}
]
param useLegacyNetworkWatcherDeployment = true
Example 2: Hub return routes in two route tables
This instance deploys a workload virtual network with the address space 10.0.20.0/24, and writes a return route for it into two route tables that stand in for the hub ingress points of a hub with a Network Virtual Appliance: the route table of GatewaySubnet, and the route table of an NVA subnet.
The two route tables are in different resource groups, to show that a hub route table can be anywhere. The module is deployed twice, the second time to prove it is idempotent.
After the module has run, the test reads the route back from both route tables and fails unless each one sends 10.0.20.0/24 to the Virtual Appliance at 10.0.1.4. A route table that was skipped fails the read.
via Bicep module
module workloadNetworking 'br/innofactor:avm/ptn/network/workload-networking:<version>' = {
name: 'workloadNetworkingDeployment'
params: {
// Required parameters
addressPrefixes: [
'<workloadAddressPrefix>'
]
// Non-required parameters
hubReturnRouteNextHopIpAddress: '<hubReturnRouteNextHopIpAddress>'
hubReturnRoutes: [
{
name: '<name>'
routeTableResourceId: '<routeTableResourceId>'
}
{
name: '<name>'
routeTableResourceId: '<routeTableResourceId>'
}
]
location: '<location>'
name: 'p-nhrr'
subnets: [
{
addressPrefix: '10.0.20.0/26'
name: 'subnet1'
}
]
useLegacyNetworkWatcherDeployment: true
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"addressPrefixes": {
"value": [
"<workloadAddressPrefix>"
]
},
// Non-required parameters
"hubReturnRouteNextHopIpAddress": {
"value": "<hubReturnRouteNextHopIpAddress>"
},
"hubReturnRoutes": {
"value": [
{
"name": "<name>",
"routeTableResourceId": "<routeTableResourceId>"
},
{
"name": "<name>",
"routeTableResourceId": "<routeTableResourceId>"
}
]
},
"location": {
"value": "<location>"
},
"name": {
"value": "p-nhrr"
},
"subnets": {
"value": [
{
"addressPrefix": "10.0.20.0/26",
"name": "subnet1"
}
]
},
"useLegacyNetworkWatcherDeployment": {
"value": true
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/ptn/network/workload-networking:<version>'
// Required parameters
param addressPrefixes = [
'<workloadAddressPrefix>'
]
// Non-required parameters
param hubReturnRouteNextHopIpAddress = '<hubReturnRouteNextHopIpAddress>'
param hubReturnRoutes = [
{
name: '<name>'
routeTableResourceId: '<routeTableResourceId>'
}
{
name: '<name>'
routeTableResourceId: '<routeTableResourceId>'
}
]
param location = '<location>'
param name = 'p-nhrr'
param subnets = [
{
addressPrefix: '10.0.20.0/26'
name: 'subnet1'
}
]
param useLegacyNetworkWatcherDeployment = true
Parameters
Required parameters
| Parameter | Type | Description |
|---|
addressPrefixes | array | An Array of 1 or more IP Address Prefixes for the Virtual Network. |
Conditional parameters
| Parameter | Type | Description |
|---|
hubReturnRouteNextHopIpAddress | string | The private IP address of the hub firewall that the return routes point at. Required if hubReturnRoutes is not empty. |
Optional parameters
| Parameter | Type | Description |
|---|
azureFirewallRulesCollectionGroup | object | Create an Azure Firewall Policy Rules Collection Group. |
connectionMonitors | array | Array that contains the Connection Monitors. |
ddosProtectionPlanResourceId | string | Resource ID of the DDoS protection plan to assign the VNET to. If it’s left blank, DDoS protection will not be configured. If it’s provided, the VNET created by this template will be attached to the referenced DDoS protection plan. The DDoS protection plan can exist in the same or in a different subscription. |
diagnosticsStorage | object | Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty. |
dnsServers | array | DNS Servers associated to the Virtual Network. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
enableVmProtection | bool | Indicates if VM protection is enabled for all the subnets in the virtual network. |
flowLogs | array | Array that contains the Flow Logs. |
flowTimeoutInMinutes | int | The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. Default value 0 will set the property to null. |
hubReturnRoutes | array | Hub route tables that must return traffic for this workload to the hub firewall. One entry per ingress route table: the GatewaySubnet route table, and the route tables of every NVA or Route Server subnet that traffic can enter through. A route for each address prefix of this network is written into each table, pointing at hubReturnRouteNextHopIpAddress. Each route table can be in another resource group or subscription. Requires hubReturnRouteNextHopIpAddress. |
hubRoutes | array | An array of routes to add to the hub Virtual Network. Each route has a name and an array of routes. The Name for this route must be the resource ID of the target route table. |
location | string | Location for all resources. |
lock | object | The lock settings of the service. |
name | string | Name of the Network Watcher resource (hidden). |
networkSecurityGroups | array | An array of Network Security Groups to add to the Virtual Network. Each NSG has a name and an array of rules. The Name for this NSG Group should match the subnet name to be automatically associated. |
networkWatcherStorageAccountNameParam | string | Name of the storage account for Network Watcher logs. If not provided, a name will be generated. |
partnerCountry | string | The Partner ID for partner attribution. |
peerings | array | Virtual Network Peering configurations. |
roleAssignments | array | Array of role assignments to create. |
routes | array | An array of routes to add to the Virtual Network. Each route has a name and an array of routes. The Name for this route should match the subnet name to be automatically associated. |
subnets | array | An Array of subnets to deploy to the Virtual Network. |
tags | object | Tags of the resource. |
useLegacyNetworkWatcherDeployment | bool | Controls whether Network Watcher is deployed in a dedicated resource group (false) or in the same resource group as the workload (true). Default is true (network resource group). |
vnetEncryption | bool | Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. Requires the EnableVNetEncryption feature to be registered for the subscription and a supported region to use this property. |
vnetEncryptionEnforcement | string | If the encrypted VNet allows VM that does not support encryption. Can only be used when vnetEncryption is enabled. |
Parameter: addressPrefixes
An Array of 1 or more IP Address Prefixes for the Virtual Network.
Parameter: hubReturnRouteNextHopIpAddress
The private IP address of the hub firewall that the return routes point at. Required if hubReturnRoutes is not empty.
- Required: No
- Type: string
- Default:
''
Parameter: azureFirewallRulesCollectionGroup
Create an Azure Firewall Policy Rules Collection Group.
- Required: No
- Type: object
- Default:
{}
Parameter: connectionMonitors
Array that contains the Connection Monitors.
- Required: No
- Type: array
- Default:
[]
Parameter: ddosProtectionPlanResourceId
Resource ID of the DDoS protection plan to assign the VNET to. If it’s left blank, DDoS protection will not be configured. If it’s provided, the VNET created by this template will be attached to the referenced DDoS protection plan. The DDoS protection plan can exist in the same or in a different subscription.
Parameter: diagnosticsStorage
Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty.
- Required: No
- Type: object
- Default:
{}
Optional parameters
Parameter: diagnosticsStorage.eventHubAuthorizationRuleId
The Authorisation Rule ID for an Event Hub that is used for monitoring data.
Parameter: diagnosticsStorage.eventHubName
The name of an Event Hub that is used for monitoring data.
Parameter: diagnosticsStorage.marketplacePartnerId
The Partner ID for a partner solution that is used for monitoring data.
Parameter: diagnosticsStorage.storageAccountResourceId
The resource ID of a Storage Account that is used for monitoring data.
Parameter: diagnosticsStorage.workspaceResourceId
The resource ID of a Log Analytics Workspace that is used for monitoring data.
Parameter: dnsServers
DNS Servers associated to the Virtual Network.
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: enableVmProtection
Indicates if VM protection is enabled for all the subnets in the virtual network.
Parameter: flowLogs
Array that contains the Flow Logs.
- Required: No
- Type: array
- Default:
[]
Parameter: flowTimeoutInMinutes
The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. Default value 0 will set the property to null.
- Required: No
- Type: int
- Default:
0 - MaxValue: 30
Parameter: hubReturnRoutes
Hub route tables that must return traffic for this workload to the hub firewall. One entry per ingress route table: the GatewaySubnet route table, and the route tables of every NVA or Route Server subnet that traffic can enter through. A route for each address prefix of this network is written into each table, pointing at hubReturnRouteNextHopIpAddress. Each route table can be in another resource group or subscription. Requires hubReturnRouteNextHopIpAddress.
- Required: No
- Type: array
- Default:
[] - MaxValue: 30
Required parameters
| Parameter | Type | Description |
|---|
name | string | The name of the route to create in that route table. |
routeTableResourceId | string | The resource ID of the hub route table to write the return route into. It can be in another resource group or subscription. |
Parameter: hubReturnRoutes.name
The name of the route to create in that route table.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: hubReturnRoutes.routeTableResourceId
The resource ID of the hub route table to write the return route into. It can be in another resource group or subscription.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: hubRoutes
An array of routes to add to the hub Virtual Network. Each route has a name and an array of routes. The Name for this route must be the resource ID of the target route table.
- Required: No
- Type: array
- Default:
[] - MaxValue: 30
Parameter: location
Location for all resources.
- Required: No
- Type: string
- Default:
[deployment().location] - MaxValue: 30
Parameter: lock
The lock settings of the service.
- Required: No
- Type: object
- MaxValue: 30
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | Specify the type of lock. |
name | string | Specify the name of lock. |
Parameter: lock.kind
Specify the type of lock.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
- MaxValue: 30
Parameter: lock.name
Specify the name of lock.
- Required: No
- Type: string
- MaxValue: 30
Parameter: name
Name of the Network Watcher resource (hidden).
- Required: No
- Type: string
- Default:
[subscription().displayName] - MaxValue: 30
Parameter: networkSecurityGroups
An array of Network Security Groups to add to the Virtual Network. Each NSG has a name and an array of rules. The Name for this NSG Group should match the subnet name to be automatically associated.
- Required: No
- Type: array
- Default:
[] - MaxValue: 30
Parameter: networkWatcherStorageAccountNameParam
Name of the storage account for Network Watcher logs. If not provided, a name will be generated.
- Required: No
- Type: string
- Default:
'' - MaxValue: 30
Parameter: partnerCountry
The Partner ID for partner attribution.
- Required: No
- Type: string
- Default:
'norway' - Allowed:
[
'denmark'
'finland'
'norway'
'sweden'
]
- MaxValue: 30
Parameter: peerings
Virtual Network Peering configurations.
- Required: No
- Type: array
- MaxValue: 30
Required parameters
| Parameter | Type | Description |
|---|
remoteVirtualNetworkResourceId | string | The Resource ID of the VNet that is this Local VNet is being peered to. Should be in the format of a Resource ID. |
Optional parameters
| Parameter | Type | Description |
|---|
allowForwardedTraffic | bool | Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. Default is true. |
allowGatewayTransit | bool | If gateway links can be used in remote virtual networking to link to this virtual network. Default is false. |
allowVirtualNetworkAccess | bool | Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. Default is true. |
doNotVerifyRemoteGateways | bool | Do not verify the provisioning state of the remote gateway. Default is true. |
name | string | The Name of VNET Peering resource. If not provided, default value will be peer-localVnetName-remoteVnetName. |
remotePeeringAllowForwardedTraffic | bool | Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. Default is true. |
remotePeeringAllowGatewayTransit | bool | If gateway links can be used in remote virtual networking to link to this virtual network. Default is false. |
remotePeeringAllowVirtualNetworkAccess | bool | Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. Default is true. |
remotePeeringDoNotVerifyRemoteGateways | bool | Do not verify the provisioning state of the remote gateway. Default is true. |
remotePeeringEnabled | bool | Deploy the outbound and the inbound peering. |
remotePeeringName | string | The name of the VNET Peering resource in the remove Virtual Network. If not provided, default value will be peer-remoteVnetName-localVnetName. |
remotePeeringUseRemoteGateways | bool | If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Default is false. |
useRemoteGateways | bool | If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Default is false. |
Parameter: peerings.remoteVirtualNetworkResourceId
The Resource ID of the VNet that is this Local VNet is being peered to. Should be in the format of a Resource ID.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: peerings.allowForwardedTraffic
Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. Default is true.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.allowGatewayTransit
If gateway links can be used in remote virtual networking to link to this virtual network. Default is false.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.allowVirtualNetworkAccess
Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. Default is true.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.doNotVerifyRemoteGateways
Do not verify the provisioning state of the remote gateway. Default is true.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.name
The Name of VNET Peering resource. If not provided, default value will be peer-localVnetName-remoteVnetName.
- Required: No
- Type: string
- MaxValue: 30
Parameter: peerings.remotePeeringAllowForwardedTraffic
Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. Default is true.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.remotePeeringAllowGatewayTransit
If gateway links can be used in remote virtual networking to link to this virtual network. Default is false.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.remotePeeringAllowVirtualNetworkAccess
Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. Default is true.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.remotePeeringDoNotVerifyRemoteGateways
Do not verify the provisioning state of the remote gateway. Default is true.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.remotePeeringEnabled
Deploy the outbound and the inbound peering.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.remotePeeringName
The name of the VNET Peering resource in the remove Virtual Network. If not provided, default value will be peer-remoteVnetName-localVnetName.
- Required: No
- Type: string
- MaxValue: 30
Parameter: peerings.remotePeeringUseRemoteGateways
If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Default is false.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: peerings.useRemoteGateways
If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Default is false.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: roleAssignments
Array of role assignments to create.
- Required: No
- Type: array
- MaxValue: 30
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the principal (user/group/identity) to assign the role to. |
roleDefinitionIdOrName | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’. |
Optional parameters
| Parameter | Type | Description |
|---|
condition | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”. |
conditionVersion | string | Version of the condition. |
delegatedManagedIdentityResourceId | string | The Resource Id of the delegated managed identity resource. |
description | string | The description of the role assignment. |
name | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. |
principalType | string | The principal type of the assigned principal ID. |
Parameter: roleAssignments.principalId
The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: roleAssignments.roleDefinitionIdOrName
The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: roleAssignments.condition
The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”.
- Required: No
- Type: string
- MaxValue: 30
Parameter: roleAssignments.conditionVersion
Version of the condition.
- Required: No
- Type: string
- Allowed:
- MaxValue: 30
Parameter: roleAssignments.delegatedManagedIdentityResourceId
The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
- MaxValue: 30
Parameter: roleAssignments.description
The description of the role assignment.
- Required: No
- Type: string
- MaxValue: 30
Parameter: roleAssignments.name
The name (as GUID) of the role assignment. If not provided, a GUID will be generated.
- Required: No
- Type: string
- MaxValue: 30
Parameter: roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
- MaxValue: 30
Parameter: routes
An array of routes to add to the Virtual Network. Each route has a name and an array of routes. The Name for this route should match the subnet name to be automatically associated.
- Required: No
- Type: array
- Default:
[] - MaxValue: 30
Parameter: subnets
An Array of subnets to deploy to the Virtual Network.
- Required: No
- Type: array
- MaxValue: 30
Required parameters
| Parameter | Type | Description |
|---|
name | string | The Name of the subnet resource. |
Conditional parameters
| Parameter | Type | Description |
|---|
addressPrefix | string | The address prefix for the subnet. Required if addressPrefixes is empty. |
addressPrefixes | array | List of address prefixes for the subnet. Required if addressPrefix is empty. |
Optional parameters
| Parameter | Type | Description |
|---|
applicationGatewayIPConfigurations | array | Application gateway IP configurations of virtual network resource. |
defaultOutboundAccess | bool | Set this property to false to disable default outbound connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet. |
delegation | string | The delegation to enable on the subnet. |
natGatewayResourceId | string | The resource ID of the NAT Gateway to use for the subnet. |
networkSecurityGroupResourceId | string | The resource ID of the network security group to assign to the subnet. |
privateEndpointNetworkPolicies | string | enable or disable apply network policies on private endpoint in the subnet. |
privateLinkServiceNetworkPolicies | string | enable or disable apply network policies on private link service in the subnet. |
roleAssignments | array | Array of role assignments to create. |
routeTableResourceId | string | The resource ID of the route table to assign to the subnet. |
serviceEndpointPolicies | array | An array of service endpoint policies. |
serviceEndpoints | array | The service endpoints to enable on the subnet. |
sharingScope | string | Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty. |
Parameter: subnets.name
The Name of the subnet resource.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: subnets.addressPrefix
The address prefix for the subnet. Required if addressPrefixes is empty.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.addressPrefixes
List of address prefixes for the subnet. Required if addressPrefix is empty.
- Required: No
- Type: array
- MaxValue: 30
Parameter: subnets.applicationGatewayIPConfigurations
Application gateway IP configurations of virtual network resource.
- Required: No
- Type: array
- MaxValue: 30
Parameter: subnets.defaultOutboundAccess
Set this property to false to disable default outbound connectivity for all VMs in the subnet. This property can only be set at the time of subnet creation and cannot be updated for an existing subnet.
- Required: No
- Type: bool
- MaxValue: 30
Parameter: subnets.delegation
The delegation to enable on the subnet.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.natGatewayResourceId
The resource ID of the NAT Gateway to use for the subnet.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.networkSecurityGroupResourceId
The resource ID of the network security group to assign to the subnet.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.privateEndpointNetworkPolicies
enable or disable apply network policies on private endpoint in the subnet.
- Required: No
- Type: string
- Allowed:
[
'Disabled'
'Enabled'
'NetworkSecurityGroupEnabled'
'RouteTableEnabled'
]
- MaxValue: 30
Parameter: subnets.privateLinkServiceNetworkPolicies
enable or disable apply network policies on private link service in the subnet.
- Required: No
- Type: string
- Allowed:
- MaxValue: 30
Parameter: subnets.roleAssignments
Array of role assignments to create.
- Required: No
- Type: array
- MaxValue: 30
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the principal (user/group/identity) to assign the role to. |
roleDefinitionIdOrName | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’. |
Optional parameters
| Parameter | Type | Description |
|---|
condition | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”. |
conditionVersion | string | Version of the condition. |
delegatedManagedIdentityResourceId | string | The Resource Id of the delegated managed identity resource. |
description | string | The description of the role assignment. |
name | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. |
principalType | string | The principal type of the assigned principal ID. |
Parameter: subnets.roleAssignments.principalId
The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: subnets.roleAssignments.roleDefinitionIdOrName
The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’.
- Required: Yes
- Type: string
- MaxValue: 30
Parameter: subnets.roleAssignments.condition
The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.roleAssignments.conditionVersion
Version of the condition.
- Required: No
- Type: string
- Allowed:
- MaxValue: 30
Parameter: subnets.roleAssignments.delegatedManagedIdentityResourceId
The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.roleAssignments.description
The description of the role assignment.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.roleAssignments.name
The name (as GUID) of the role assignment. If not provided, a GUID will be generated.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
- MaxValue: 30
Parameter: subnets.routeTableResourceId
The resource ID of the route table to assign to the subnet.
- Required: No
- Type: string
- MaxValue: 30
Parameter: subnets.serviceEndpointPolicies
An array of service endpoint policies.
- Required: No
- Type: array
- MaxValue: 30
Parameter: subnets.serviceEndpoints
The service endpoints to enable on the subnet.
- Required: No
- Type: array
- MaxValue: 30
Parameter: subnets.sharingScope
Set this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant. This property can only be set if defaultOutboundAccess is set to false, both properties can only be set if subnet is empty.
- Required: No
- Type: string
- Allowed:
[
'DelegatedServices'
'Tenant'
]
- MaxValue: 30
Tags of the resource.
- Required: No
- Type: object
- MaxValue: 30
Parameter: useLegacyNetworkWatcherDeployment
Controls whether Network Watcher is deployed in a dedicated resource group (false) or in the same resource group as the workload (true). Default is true (network resource group).
- Required: No
- Type: bool
- Default:
True - MaxValue: 30
Parameter: vnetEncryption
Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. Requires the EnableVNetEncryption feature to be registered for the subscription and a supported region to use this property.
- Required: No
- Type: bool
- Default:
False - MaxValue: 30
Parameter: vnetEncryptionEnforcement
If the encrypted VNet allows VM that does not support encryption. Can only be used when vnetEncryption is enabled.
- Required: No
- Type: string
- Default:
'AllowUnencrypted' - Allowed:
[
'AllowUnencrypted'
'DropUnencrypted'
]
- MaxValue: 30
Outputs
| Output | Type | Description |
|---|
hubReturnRouteTableResourceIds | array | The resource IDs of the hub route tables that received a return route. |
networkResourceGroupResourceId | string | The resource ID of the deployed virtual network. |
networkWatcherLocation | string | The location the resource was deployed into. |
networkWatchername | string | The name of the deployed network watcher. |
networkWatcherResourceGroupId | string | The resource group ID of the deployed network watcher. |
networkWatcherResourceGroupName | string | The resource group the network watcher was deployed into. |
networkWatcherResourceId | string | The resource ID of the deployed network watcher. |
nsgNames | array | The name of the route table. |
nsgNamesList | array | The names of all Routes provided. |
nsgResourceIds | array | The resource ID of the route table. |
routeNamesList | array | The names of all Routes provided. |
routeTableNames | array | The name of the route table. |
routeTableResourceIds | array | The resource ID of the route table. |
subnetNames | array | The names of the deployed subnets. |
subnetResourceIds | array | The resource IDs of the deployed subnets. |
virtualNetworkName | string | The name of the virtual network. |
virtualNetworkResourceIds | string | The resource IDs of the deployed virtual network. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/ptn/management/partner:0.1.0 | Remote reference |
br/public:avm/ptn/network/spoke-networking:<version> | Remote reference |
br/public:avm/res/network/network-security-group:0.5.1 | Remote reference |
br/public:avm/res/network/network-watcher:0.4.1 | Remote reference |
br/public:avm/res/network/route-table:0.4.1 | Remote reference |
br/public:avm/res/network/virtual-network:0.7.0 | Remote reference |
br/public:avm/res/storage/storage-account:0.20.0 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.4.11
Changes
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Added
hubReturnRoutes ({ routeTableResourceId: string, name: string }[], default empty) and hubReturnRouteNextHopIpAddress. For every listed hub route table, in any resource group or subscription, the module writes a route for each address prefix of the network to the hub firewall. List every route table that traffic can enter the hub through, such as the one for GatewaySubnet and the ones for NVA or Route Server subnets, so the return path never covers only one of them. Existing deployments see no change when the list is empty (ADR 0012). - Added the e2e test
hub-return-routes: two route tables in two resource groups, both checked for the route after a deployment that runs twice. - The e2e tests run in regions without a Network Watcher (
francecentral, swedencentral). The legacy Network Watcher deployment creates a watcher of its own, and the test subscription already had one in uksouth, which failed the defaults test with the one-per-region quota. - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
0.4.10
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.9
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.8
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.7
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.6
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.5
Changes
- Fixing network watcher storage (#197)
Breaking Changes
0.4.4
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.3
Changes
- 193 avm module issue network landing zone is does not allow to customise the network watcher (#194)
Breaking Changes
0.4.2
Changes
- Enable vnet flow logs in workload-networking (#173)
Breaking Changes
0.4.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.4.0
Changes
- Add disable bgp root propagation on route tables (#156)
- Rename pattern module (#150)
Breaking Changes
Version history
| Version | Published |
|---|
0.4.11 | 2026-11-11 |
0.4.10 | 2025-08-31 |
0.4.9 | 2025-08-16 |
0.4.8 | 2025-08-01 |
0.4.7 | 2025-07-31 |
0.4.6 | 2025-07-16 |
0.4.5 | 2025-07-02 |
0.4.4 | 2025-07-01 |
0.4.3 | 2025-06-30 |
0.4.2 | 2025-05-29 |
0.4.1 | 2025-03-01 |
0.4.0 | 2025-02-27 |
resource-providers
br/innofactor:avm/res/custom-providers/resource-providers:0.1.0
Deprecated. Azure retired Custom Resource Providers on 31 Oct 2026, so this module can no longer deploy. Replacement: Azure Virtual Network Manager IPAM. Published versions remain available in the registry.
Overview
This module deploys an Azure Custom Resource Provider.
Parameters
| Name | Type | Required | Default | Description |
|---|
lock | lockType (object) | Yes | | Optional. The lock settings of the service. |
name | string | Yes | | Required. Name of your Azure Custom Provider. |
actions | array | No | [] | Optional. Actions of the resource. |
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
location | string | No | "[resourceGroup().location]" | Optional. Location for all Resources. |
resourceTypes | array | No | [] | Optional. Resource Types of the resource. |
tags | object | No | | Optional. Tags of the resource. |
validations | array | No | [] | Optional. Validations endpoints of the resource. |
Outputs
| Name | Type | Description |
|---|
name | string | The Name of the Azure Custom Provider. |
resourceGroupName | string | The name of the Resource Group. |
resourceId | string | The resource ID of the Azure Custom Provider. |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|
0.1.0 | 2025-01-31 |
Use this module
module example 'br/innofactor:avm/res/custom-providers/resource-providers:0.1.0' = {
name: 'example'
params: {}
}
Grafana
br/innofactor:avm/res/dashboard/grafana:0.2.0
README
Azure Grafana Dashboard [Microsoft.Dashboard/grafana]
This module deploys an Azure Grafana Dashboard
Navigation
Resource Types
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/res/dashboard/grafana:<version>.
Example 1: Using only defaults
This instance deploys the module with the minimum set of required parameters.
via Bicep module
module grafana 'br/innofactor:avm/res/dashboard/grafana:<version>' = {
name: 'grafanaDeployment'
params: {
// Required parameters
name: 'dbgmin001'
// Non-required parameters
location: '<location>'
zoneRedundancy: 'Enabled'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"name": {
"value": "dbgmin001"
},
// Non-required parameters
"location": {
"value": "<location>"
},
"zoneRedundancy": {
"value": "Enabled"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/res/dashboard/grafana:<version>'
// Required parameters
param name = 'dbgmin001'
// Non-required parameters
param location = '<location>'
param zoneRedundancy = 'Enabled'
Example 2: Grafana Dashboard using WAF-aligned Configuration
This instance deploys the module in alignment with the best-practices of the Azure Well-Architected Framework.
via Bicep module
module grafana 'br/innofactor:avm/res/dashboard/grafana:<version>' = {
name: 'grafanaDeployment'
params: {
// Required parameters
name: 'dbgwaf001'
// Non-required parameters
diagnosticSettings: [
{
eventHubAuthorizationRuleResourceId: '<eventHubAuthorizationRuleResourceId>'
eventHubName: '<eventHubName>'
storageAccountResourceId: '<storageAccountResourceId>'
workspaceResourceId: '<workspaceResourceId>'
}
]
location: '<location>'
lock: {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
managedIdentities: {
systemAssigned: false
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
privateEndpoints: [
{
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
subnetResourceId: '<subnetResourceId>'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'Test Grafana Instance'
Role: 'DeploymentValidation'
}
}
{
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
subnetResourceId: '<subnetResourceId>'
}
]
roleAssignments: [
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'Owner'
}
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
}
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: '<roleDefinitionIdOrName>'
}
]
tags: {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
zoneRedundancy: 'Enabled'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"name": {
"value": "dbgwaf001"
},
// Non-required parameters
"diagnosticSettings": {
"value": [
{
"eventHubAuthorizationRuleResourceId": "<eventHubAuthorizationRuleResourceId>",
"eventHubName": "<eventHubName>",
"storageAccountResourceId": "<storageAccountResourceId>",
"workspaceResourceId": "<workspaceResourceId>"
}
]
},
"location": {
"value": "<location>"
},
"lock": {
"value": {
"kind": "CanNotDelete",
"name": "myCustomLockName"
}
},
"managedIdentities": {
"value": {
"systemAssigned": false,
"userAssignedResourceIds": [
"<managedIdentityResourceId>"
]
}
},
"privateEndpoints": {
"value": [
{
"privateDnsZoneResourceIds": [
"<privateDNSZoneResourceId>"
],
"subnetResourceId": "<subnetResourceId>",
"tags": {
"Environment": "Non-Prod",
"hidden-title": "Test Grafana Instance",
"Role": "DeploymentValidation"
}
},
{
"privateDnsZoneResourceIds": [
"<privateDNSZoneResourceId>"
],
"subnetResourceId": "<subnetResourceId>"
}
]
},
"roleAssignments": {
"value": [
{
"principalId": "<principalId>",
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "Owner"
},
{
"principalId": "<principalId>",
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "b24988ac-6180-42a0-ab88-20f7382dd24c"
},
{
"principalId": "<principalId>",
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "<roleDefinitionIdOrName>"
}
]
},
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-title": "This is visible in the resource name",
"Role": "DeploymentValidation"
}
},
"zoneRedundancy": {
"value": "Enabled"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/res/dashboard/grafana:<version>'
// Required parameters
param name = 'dbgwaf001'
// Non-required parameters
param diagnosticSettings = [
{
eventHubAuthorizationRuleResourceId: '<eventHubAuthorizationRuleResourceId>'
eventHubName: '<eventHubName>'
storageAccountResourceId: '<storageAccountResourceId>'
workspaceResourceId: '<workspaceResourceId>'
}
]
param location = '<location>'
param lock = {
kind: 'CanNotDelete'
name: 'myCustomLockName'
}
param managedIdentities = {
systemAssigned: false
userAssignedResourceIds: [
'<managedIdentityResourceId>'
]
}
param privateEndpoints = [
{
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
subnetResourceId: '<subnetResourceId>'
tags: {
Environment: 'Non-Prod'
'hidden-title': 'Test Grafana Instance'
Role: 'DeploymentValidation'
}
}
{
privateDnsZoneResourceIds: [
'<privateDNSZoneResourceId>'
]
subnetResourceId: '<subnetResourceId>'
}
]
param roleAssignments = [
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'Owner'
}
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
}
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: '<roleDefinitionIdOrName>'
}
]
param tags = {
Environment: 'Non-Prod'
'hidden-title': 'This is visible in the resource name'
Role: 'DeploymentValidation'
}
param zoneRedundancy = 'Enabled'
Parameters
Required parameters
| Parameter | Type | Description |
|---|
name | string | Name of your Azure Grafana Dashboard. |
Optional parameters
| Parameter | Type | Description |
|---|
diagnosticSettings | array | The diagnostic settings of the service. |
enableApiKey | bool | The api key setting of the Grafana instance. |
enableDeterministicOutboundIP | bool | Whether a Grafana instance uses deterministic outbound IPs for this instancey. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
grafanaMajorVersion | string | The major version of Grafana to deploy. Azure currently accepts 12 and 13 for the Standard SKU; older majors are rejected. |
grafanaSku | string | Tier of your Azure Grafana Dashboard. |
location | string | Location for all Resources. |
lock | object | The lock settings of the service. |
managedIdentities | object | The managed identity definition for this resource. |
privateEndpoints | array | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the ‘acrSku’ to be ‘Premium’. |
publicNetworkAccess | string | Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the ‘acrSku’ to be ‘Premium’. |
roleAssignments | array | Array of role assignments to create. |
tags | object | Tags of the resource. |
zoneRedundancy | string | Whether or not zone redundancy is enabled for this Grafana dashboard. |
Parameter: name
Name of your Azure Grafana Dashboard.
- Required: Yes
- Type: string
Parameter: diagnosticSettings
The diagnostic settings of the service.
Optional parameters
| Parameter | Type | Description |
|---|
eventHubAuthorizationRuleResourceId | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
eventHubName | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
logAnalyticsDestinationType | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
logCategoriesAndGroups | array | The name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection. |
marketplacePartnerResourceId | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
metricCategories | array | The name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection. |
name | string | The name of diagnostic setting. |
storageAccountResourceId | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
workspaceResourceId | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
Parameter: diagnosticSettings.eventHubAuthorizationRuleResourceId
Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
Parameter: diagnosticSettings.eventHubName
Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
Parameter: diagnosticSettings.logAnalyticsDestinationType
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
- Required: No
- Type: string
- Allowed:
[
'AzureDiagnostics'
'Dedicated'
]
Parameter: diagnosticSettings.logCategoriesAndGroups
The name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection.
Optional parameters
| Parameter | Type | Description |
|---|
category | string | Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here. |
categoryGroup | string | Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs. |
enabled | bool | Enable or disable the category explicitly. Default is true. |
Parameter: diagnosticSettings.logCategoriesAndGroups.category
Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
Parameter: diagnosticSettings.logCategoriesAndGroups.categoryGroup
Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs.
Parameter: diagnosticSettings.logCategoriesAndGroups.enabled
Enable or disable the category explicitly. Default is true.
Parameter: diagnosticSettings.marketplacePartnerResourceId
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
Parameter: diagnosticSettings.metricCategories
The name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection.
Required parameters
| Parameter | Type | Description |
|---|
category | string | Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics. |
Optional parameters
| Parameter | Type | Description |
|---|
enabled | bool | Enable or disable the category explicitly. Default is true. |
Parameter: diagnosticSettings.metricCategories.category
Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.
- Required: Yes
- Type: string
Parameter: diagnosticSettings.metricCategories.enabled
Enable or disable the category explicitly. Default is true.
Parameter: diagnosticSettings.name
The name of diagnostic setting.
Parameter: diagnosticSettings.storageAccountResourceId
Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
Parameter: diagnosticSettings.workspaceResourceId
Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
Parameter: enableApiKey
The api key setting of the Grafana instance.
- Required: No
- Type: bool
- Default:
False
Parameter: enableDeterministicOutboundIP
Whether a Grafana instance uses deterministic outbound IPs for this instancey.
- Required: No
- Type: bool
- Default:
False
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: grafanaMajorVersion
The major version of Grafana to deploy. Azure currently accepts 12 and 13 for the Standard SKU; older majors are rejected.
- Required: No
- Type: string
- Default:
'12' - Allowed:
Parameter: grafanaSku
Tier of your Azure Grafana Dashboard.
- Required: No
- Type: string
- Default:
'Standard' - Allowed:
Parameter: location
Location for all Resources.
- Required: No
- Type: string
- Default:
[resourceGroup().location]
Parameter: lock
The lock settings of the service.
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | Specify the type of lock. |
name | string | Specify the name of lock. |
Parameter: lock.kind
Specify the type of lock.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
Parameter: lock.name
Specify the name of lock.
Parameter: managedIdentities
The managed identity definition for this resource.
Optional parameters
Parameter: managedIdentities.systemAssigned
Enables system assigned managed identity on the resource.
Parameter: managedIdentities.userAssignedResourceIds
The resource ID(s) to assign to the resource.
Parameter: privateEndpoints
Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the ‘acrSku’ to be ‘Premium’.
Required parameters
| Parameter | Type | Description |
|---|
subnetResourceId | string | Resource ID of the subnet where the endpoint needs to be created. |
Optional parameters
| Parameter | Type | Description |
|---|
applicationSecurityGroupResourceIds | array | Application security groups in which the private endpoint IP configuration is included. |
customDnsConfigs | array | Custom DNS configurations. |
customNetworkInterfaceName | string | The custom name of the network interface attached to the private endpoint. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
ipConfigurations | array | A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints. |
isManualConnection | bool | If Manual Private Link Connection is required. |
location | string | The location to deploy the private endpoint to. |
lock | object | Specify the type of lock. |
manualConnectionRequestMessage | string | A message passed to the owner of the remote resource with the manual connection request. |
name | string | The name of the private endpoint. |
privateDnsZoneGroupName | string | The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided. |
privateDnsZoneResourceIds | array | The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones. |
roleAssignments | array | Array of role assignments to create. |
service | string | The subresource to deploy the private endpoint for. For example “vault”, “mysqlServer” or “dataFactory”. |
tags | object | Tags to be applied on all resources/resource groups in this deployment. |
Parameter: privateEndpoints.subnetResourceId
Resource ID of the subnet where the endpoint needs to be created.
- Required: Yes
- Type: string
Parameter: privateEndpoints.applicationSecurityGroupResourceIds
Application security groups in which the private endpoint IP configuration is included.
Parameter: privateEndpoints.customDnsConfigs
Custom DNS configurations.
Required parameters
| Parameter | Type | Description |
|---|
ipAddresses | array | A list of private IP addresses of the private endpoint. |
Optional parameters
| Parameter | Type | Description |
|---|
fqdn | string | Fqdn that resolves to private endpoint IP address. |
Parameter: privateEndpoints.customDnsConfigs.ipAddresses
A list of private IP addresses of the private endpoint.
Parameter: privateEndpoints.customDnsConfigs.fqdn
Fqdn that resolves to private endpoint IP address.
Parameter: privateEndpoints.customNetworkInterfaceName
The custom name of the network interface attached to the private endpoint.
Parameter: privateEndpoints.enableTelemetry
Enable/Disable usage telemetry for module.
Parameter: privateEndpoints.ipConfigurations
A list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
Required parameters
| Parameter | Type | Description |
|---|
name | string | The name of the resource that is unique within a resource group. |
properties | object | Properties of private endpoint IP configurations. |
Parameter: privateEndpoints.ipConfigurations.name
The name of the resource that is unique within a resource group.
- Required: Yes
- Type: string
Parameter: privateEndpoints.ipConfigurations.properties
Properties of private endpoint IP configurations.
- Required: Yes
- Type: object
Required parameters
| Parameter | Type | Description |
|---|
groupId | string | The ID of a group obtained from the remote resource that this private endpoint should connect to. |
memberName | string | The member name of a group obtained from the remote resource that this private endpoint should connect to. |
privateIPAddress | string | A private IP address obtained from the private endpoint’s subnet. |
Parameter: privateEndpoints.ipConfigurations.properties.groupId
The ID of a group obtained from the remote resource that this private endpoint should connect to.
- Required: Yes
- Type: string
Parameter: privateEndpoints.ipConfigurations.properties.memberName
The member name of a group obtained from the remote resource that this private endpoint should connect to.
- Required: Yes
- Type: string
Parameter: privateEndpoints.ipConfigurations.properties.privateIPAddress
A private IP address obtained from the private endpoint’s subnet.
- Required: Yes
- Type: string
Parameter: privateEndpoints.isManualConnection
If Manual Private Link Connection is required.
Parameter: privateEndpoints.location
The location to deploy the private endpoint to.
Parameter: privateEndpoints.lock
Specify the type of lock.
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | Specify the type of lock. |
name | string | Specify the name of lock. |
Parameter: privateEndpoints.lock.kind
Specify the type of lock.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
Parameter: privateEndpoints.lock.name
Specify the name of lock.
Parameter: privateEndpoints.manualConnectionRequestMessage
A message passed to the owner of the remote resource with the manual connection request.
Parameter: privateEndpoints.name
The name of the private endpoint.
Parameter: privateEndpoints.privateDnsZoneGroupName
The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
Parameter: privateEndpoints.privateDnsZoneResourceIds
The private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
Parameter: privateEndpoints.roleAssignments
Array of role assignments to create.
- Required: No
- Type: array
- Roles configurable by name:
'Contributor''DNS Resolver Contributor''DNS Zone Contributor''Domain Services Contributor''Domain Services Reader''Network Contributor''Owner''Private DNS Zone Contributor''Reader''Role Based Access Control Administrator (Preview)'
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the principal (user/group/identity) to assign the role to. |
roleDefinitionIdOrName | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’. |
Optional parameters
| Parameter | Type | Description |
|---|
condition | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”. |
conditionVersion | string | Version of the condition. |
delegatedManagedIdentityResourceId | string | The Resource Id of the delegated managed identity resource. |
description | string | The description of the role assignment. |
principalType | string | The principal type of the assigned principal ID. |
Parameter: privateEndpoints.roleAssignments.principalId
The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
Parameter: privateEndpoints.roleAssignments.roleDefinitionIdOrName
The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’.
- Required: Yes
- Type: string
Parameter: privateEndpoints.roleAssignments.condition
The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”.
Parameter: privateEndpoints.roleAssignments.conditionVersion
Version of the condition.
- Required: No
- Type: string
- Allowed:
Parameter: privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId
The Resource Id of the delegated managed identity resource.
Parameter: privateEndpoints.roleAssignments.description
The description of the role assignment.
Parameter: privateEndpoints.roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
Parameter: privateEndpoints.service
The subresource to deploy the private endpoint for. For example “vault”, “mysqlServer” or “dataFactory”.
Tags to be applied on all resources/resource groups in this deployment.
Parameter: publicNetworkAccess
Whether or not public network access is allowed for this resource. For security reasons it should be disabled. If not specified, it will be disabled by default if private endpoints are set and networkRuleSetIpRules are not set. Note, requires the ‘acrSku’ to be ‘Premium’.
- Required: No
- Type: string
- Allowed:
Parameter: roleAssignments
Array of role assignments to create.
- Required: No
- Type: array
- Roles configurable by name:
'GrafanaAdmin''GrafanaEditor''GrafanaViewer''Contributor''Owner''Reader''Role Based Access Control Administrator (Preview)''User Access Administrator'
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the principal (user/group/identity) to assign the role to. |
roleDefinitionIdOrName | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’. |
Optional parameters
| Parameter | Type | Description |
|---|
condition | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”. |
conditionVersion | string | Version of the condition. |
delegatedManagedIdentityResourceId | string | The Resource Id of the delegated managed identity resource. |
description | string | The description of the role assignment. |
principalType | string | The principal type of the assigned principal ID. |
Parameter: roleAssignments.principalId
The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
Parameter: roleAssignments.roleDefinitionIdOrName
The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’.
- Required: Yes
- Type: string
Parameter: roleAssignments.condition
The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”.
Parameter: roleAssignments.conditionVersion
Version of the condition.
- Required: No
- Type: string
- Allowed:
Parameter: roleAssignments.delegatedManagedIdentityResourceId
The Resource Id of the delegated managed identity resource.
Parameter: roleAssignments.description
The description of the role assignment.
Parameter: roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
Tags of the resource.
Parameter: zoneRedundancy
Whether or not zone redundancy is enabled for this Grafana dashboard.
- Required: No
- Type: string
- Default:
'Disabled' - Allowed:
Outputs
| Output | Type | Description |
|---|
location | string | The location the resource was deployed into. |
loginServer | string | The reference to the Azure Grafana Dashboard. |
name | string | The Name of the Azure Grafana Dashboard. |
resourceGroupName | string | The name of the Azure Grafana Dashboard. |
resourceId | string | The resource ID of the Azure Grafana Dashboard. |
systemAssignedMIPrincipalId | string | The principal ID of the system assigned identity. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/public:avm/res/network/private-endpoint:0.4.1 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
The latest version of the changelog can be found here.
0.2.0
Changes
- Added the
grafanaMajorVersion parameter. It accepts 12 and 13, the majors Azure accepts for the Standard SKU, and defaults to 12. Other values are rejected at validation time. See ADR 0006. - Private endpoints are created one at a time. Creating two in parallel made the Grafana resource provider return
CreateOrUpdateConflict. - The defaults and waf-aligned tests enable zone redundancy, which satisfies the PSRule WAF Reliability rules.
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
- The default Grafana major version changed from
10 (hardcoded) to 12. Azure no longer accepts 10 or 11, so the old default could not be deployed. A deployment that relied on the default now creates or upgrades to Grafana 12. Set grafanaMajorVersion explicitly to choose between 12 and 13.
0.1.3
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.2
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.0
Changes
- Fixing bugs in modules and ci (#38)
- Fixing modules due to avm ci update to match upstream and fix bugs (#34)
- AVM Update to resync the ci for bugs and features (#33)
- Contributing guidance (#8)
- Modules grafana dashboard module (#53)
- Feat/dashboard grafana 001 (#45)
- Preflight (#54)
- Feat/grafana dashboard module (#52)
- Feat/dashboard grafana 001 (#45) (#46)
- Adding main scaffolding to module (#44)
- Bug: ts publish Feat release (#39)
- Update the desc on the grafana module (#38)
- Bug and workflows (#37)
- Bug: Feat publish test (#35)
- Feature/ptn.lz.container registry (#31)
- Feature/ptn.lz.container registry (#30)
- Feature/ptn.lz.container registry (#29)
- Update to grafana dashboard (#28)
- Add locks to grafana (#27)
- Update to grafana to test pipes (#22)
- Avm res dashboard grafana (#9)
- Feat avm res dashboard grafana (#8)
- Feat avm res dashboard grafana (#3)
- Avm res dashboard grafana (#1)
Breaking Changes
Version history
| Version | Published |
|---|
0.2.0 | 2026-11-10 |
0.1.3 | 2025-02-01 |
0.1.2 | 2025-01-31 |
0.1.1 | 2025-01-29 |
0.1.0 | 2025-01-29 |
route-server
br/innofactor:avm/res/network/route-server:0.1.14
README
route-server [Microsoft.Network/routeserver]
Azure Route Server Module
This module deploys an Azure Route Server, providing a managed routing solution for virtual networks. It simplifies the configuration of BGP peering between your network virtual appliances (NVAs) and Azure, enabling dynamic route exchange and advanced networking scenarios.
Note: This module is specifically designed for deploying and configuring a Route Server within a Virtual WAN Hub and does not support Virtual Network deployments. While the Public Repository includes a more comprehensive Network-Hub module—featuring a Routing Intent—it currently lacks support for Virtual Network scenarios. Therefore, this module exists to address that gap.
Navigation
Features
Default Configuration
By default, the module:
- Deploys a Route Server with standard SKU and regional tier.
- Creates a public IP address with standard SKU.
- Sets up in all availability zones (1, 2, 3).
- Configures ASN 65515 and minimum capacity of 2 scale units.
- Disables branch-to-branch traffic.
Customization Options
- BGP Peering: Add custom BGP peers by specifying name, ASN, and IP.
- Routing Preference: Choose between ASPath, ExpressRoute, or VpnGateway.
- Public IP: Customize domain name label, diagnostic settings, and IP prefix.
- Security: Configure Azure Firewall association and RBAC assignments.
- Monitoring: Set up diagnostic settings for logs and metrics.
This module provides a comprehensive solution for deploying and managing Azure Route Server, enabling advanced networking scenarios and seamless integration with on-premises and cloud networks.
Quick Start
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/res/network/route-server' = {
name: 'routeServer'
scope: resourceGroup
params: {
name: 'myRouteServer'
tags: {
Environment: 'Production'
}
}
}
Resource Types
Usage examples
The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module’s test folder in its repository.
Note: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.
Note: To reference the module, please use the following syntax br/innofactor:avm/res/network/route-server:<version>.
Example 1:
Module Test Title
Usage Example
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/ptn/lz/subscription-configuration' = {
name: 'subscriptionConfiguration'
scope: managementGroup('myManagementGroup')
params: {
name: 'myLandingZone'
tags: {
Environment: 'Production'
}
}
}
via Bicep module
module routeServer 'br/innofactor:avm/res/network/route-server:<version>' = {
name: 'routeServerDeployment'
params: {
// Required parameters
vNetResourceId: '<vNetResourceId>'
// Non-required parameters
location: '<location>'
name: 'nrsmin001'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"vNetResourceId": {
"value": "<vNetResourceId>"
},
// Non-required parameters
"location": {
"value": "<location>"
},
"name": {
"value": "nrsmin001"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/res/network/route-server:<version>'
// Required parameters
param vNetResourceId = '<vNetResourceId>'
// Non-required parameters
param location = '<location>'
param name = 'nrsmin001'
Example 2:
Module Test Title
Usage Example
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module subscriptionConfiguration 'br/innofactor:avm/ptn/lz/subscription-configuration' = {
name: 'subscriptionConfiguration'
scope: managementGroup('myManagementGroup')
params: {
name: 'myLandingZone'
tags: {
Environment: 'Production'
}
}
}
via Bicep module
module routeServer 'br/innofactor:avm/res/network/route-server:<version>' = {
name: 'routeServerDeployment'
params: {
// Required parameters
vNetResourceId: '<vNetResourceId>'
// Non-required parameters
location: '<location>'
name: 'nrswaf001'
}
}
via JSON parameters file
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"vNetResourceId": {
"value": "<vNetResourceId>"
},
// Non-required parameters
"location": {
"value": "<location>"
},
"name": {
"value": "nrswaf001"
}
}
}
via Bicep parameters file
using 'br/innofactor:avm/res/network/route-server:<version>'
// Required parameters
param vNetResourceId = '<vNetResourceId>'
// Non-required parameters
param location = '<location>'
param name = 'nrswaf001'
Parameters
Required parameters
| Parameter | Type | Description |
|---|
vNetResourceId | string | The resource ID of the virtual network that the Route Server will be deployed into. |
Optional parameters
| Parameter | Type | Description |
|---|
allowBranchToBranchTraffic | bool | Flag to control transit for Route Server. Defaults to false. |
azureFirewallResourceId | string | The Azure Firewall associated with this Route Server. |
bgpPeers | array | An array detailing the remote BGP peers of this Route Server. |
diagnosticSettings | array | The diagnostic settings of the service. |
domainNameLabel | string | DNS name of the Public IP resource. If you want to use this feature. A region specific suffix will be appended to it, e.g.: your-DNS-name.westeurope.cloudapp.azure.com. |
enableTelemetry | bool | Enable/Disable usage telemetry for module. |
hubRoutingPreference | string | The routing preference of this Route Server. Possible values are ASPath, ExpressRoute or VpnGateway. The default is ExpressRoute. |
location | string | Location for all resources. |
lock | object | The lock settings of the service. |
minCapacity | int | An integer value that configuresminimum number of scale units for this Route Server. The Minimum is 0. The default is 2. |
name | string | Name of the Network Watcher resource (hidden). |
publicIpDiagnosticSettings | array | The diagnostic settings of the Public IP. |
publicIPPrefixResourceId | string | Resource ID of a Public IP Prefix object. This is only needed if you want your Public IP created in a PIP Prefix. |
roleAssignments | array | Array of role assignments to create. |
tags | object | Tags of the resource. |
virtualRouterAsn | int | An integer value that configures the ASN for this Route Server. The range of values is 0-4294967295. The default is 65515. |
zones | array | A list of availability zones denoting where the Route Server Public IP Address resource needs to come from. |
Parameter: vNetResourceId
The resource ID of the virtual network that the Route Server will be deployed into.
- Required: Yes
- Type: string
Parameter: allowBranchToBranchTraffic
Flag to control transit for Route Server. Defaults to false.
- Required: No
- Type: bool
- Default:
False
Parameter: azureFirewallResourceId
The Azure Firewall associated with this Route Server.
- Required: No
- Type: string
- Default:
''
Parameter: bgpPeers
An array detailing the remote BGP peers of this Route Server.
- Required: No
- Type: array
- Default:
[]
Required parameters
| Parameter | Type | Description |
|---|
name | string | The unique name of the remote BGP peer. |
peerAsn | int | An integrer representing the ASN of the remote BGP peer. |
peerIp | string | The IP address of the remote BGP peer. |
Parameter: bgpPeers.name
The unique name of the remote BGP peer.
- Required: Yes
- Type: string
Parameter: bgpPeers.peerAsn
An integrer representing the ASN of the remote BGP peer.
Parameter: bgpPeers.peerIp
The IP address of the remote BGP peer.
- Required: Yes
- Type: string
Parameter: diagnosticSettings
The diagnostic settings of the service.
Optional parameters
| Parameter | Type | Description |
|---|
eventHubAuthorizationRuleResourceId | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
eventHubName | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
logAnalyticsDestinationType | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
logCategoriesAndGroups | array | The name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection. |
marketplacePartnerResourceId | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
metricCategories | array | The name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection. |
name | string | The name of diagnostic setting. |
storageAccountResourceId | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
workspaceResourceId | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
Parameter: diagnosticSettings.eventHubAuthorizationRuleResourceId
Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
Parameter: diagnosticSettings.eventHubName
Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
Parameter: diagnosticSettings.logAnalyticsDestinationType
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
- Required: No
- Type: string
- Allowed:
[
'AzureDiagnostics'
'Dedicated'
]
Parameter: diagnosticSettings.logCategoriesAndGroups
The name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection.
Optional parameters
| Parameter | Type | Description |
|---|
category | string | Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here. |
categoryGroup | string | Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs. |
enabled | bool | Enable or disable the category explicitly. Default is true. |
Parameter: diagnosticSettings.logCategoriesAndGroups.category
Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
Parameter: diagnosticSettings.logCategoriesAndGroups.categoryGroup
Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs.
Parameter: diagnosticSettings.logCategoriesAndGroups.enabled
Enable or disable the category explicitly. Default is true.
Parameter: diagnosticSettings.marketplacePartnerResourceId
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
Parameter: diagnosticSettings.metricCategories
The name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection.
Required parameters
| Parameter | Type | Description |
|---|
category | string | Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics. |
Optional parameters
| Parameter | Type | Description |
|---|
enabled | bool | Enable or disable the category explicitly. Default is true. |
Parameter: diagnosticSettings.metricCategories.category
Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.
- Required: Yes
- Type: string
Parameter: diagnosticSettings.metricCategories.enabled
Enable or disable the category explicitly. Default is true.
Parameter: diagnosticSettings.name
The name of diagnostic setting.
Parameter: diagnosticSettings.storageAccountResourceId
Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
Parameter: diagnosticSettings.workspaceResourceId
Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
Parameter: domainNameLabel
DNS name of the Public IP resource. If you want to use this feature. A region specific suffix will be appended to it, e.g.: your-DNS-name.westeurope.cloudapp.azure.com.
- Required: No
- Type: string
- Default:
''
Parameter: enableTelemetry
Enable/Disable usage telemetry for module.
- Required: No
- Type: bool
- Default:
True
Parameter: hubRoutingPreference
The routing preference of this Route Server. Possible values are ASPath, ExpressRoute or VpnGateway. The default is ExpressRoute.
- Required: No
- Type: string
- Default:
'ExpressRoute' - Allowed:
[
'ASPath'
'ExpressRoute'
'VpnGateway'
]
Parameter: location
Location for all resources.
- Required: No
- Type: string
- Default:
[resourceGroup().location]
Parameter: lock
The lock settings of the service.
Optional parameters
| Parameter | Type | Description |
|---|
kind | string | Specify the type of lock. |
name | string | Specify the name of lock. |
Parameter: lock.kind
Specify the type of lock.
- Required: No
- Type: string
- Allowed:
[
'CanNotDelete'
'None'
'ReadOnly'
]
Parameter: lock.name
Specify the name of lock.
Parameter: minCapacity
An integer value that configuresminimum number of scale units for this Route Server. The Minimum is 0. The default is 2.
- Required: No
- Type: int
- Default:
2 - MinValue: 0
Parameter: name
Name of the Network Watcher resource (hidden).
- Required: No
- Type: string
- Default:
[subscription().displayName] - MinValue: 0
Parameter: publicIpDiagnosticSettings
The diagnostic settings of the Public IP.
- Required: No
- Type: array
- MinValue: 0
Optional parameters
| Parameter | Type | Description |
|---|
eventHubAuthorizationRuleResourceId | string | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. |
eventHubName | string | Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
logAnalyticsDestinationType | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
logCategoriesAndGroups | array | The name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection. |
marketplacePartnerResourceId | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
metricCategories | array | The name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection. |
name | string | The name of diagnostic setting. |
storageAccountResourceId | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
workspaceResourceId | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
Parameter: publicIpDiagnosticSettings.eventHubAuthorizationRuleResourceId
Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.eventHubName
Name of the diagnostic event hub within the namespace to which logs are streamed. Without this, an event hub is created for each log category. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.logAnalyticsDestinationType
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
- Required: No
- Type: string
- Allowed:
[
'AzureDiagnostics'
'Dedicated'
]
- MinValue: 0
Parameter: publicIpDiagnosticSettings.logCategoriesAndGroups
The name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection.
- Required: No
- Type: array
- MinValue: 0
Optional parameters
| Parameter | Type | Description |
|---|
category | string | Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here. |
categoryGroup | string | Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs. |
enabled | bool | Enable or disable the category explicitly. Default is true. |
Parameter: publicIpDiagnosticSettings.logCategoriesAndGroups.category
Name of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.logCategoriesAndGroups.categoryGroup
Name of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.logCategoriesAndGroups.enabled
Enable or disable the category explicitly. Default is true.
- Required: No
- Type: bool
- MinValue: 0
Parameter: publicIpDiagnosticSettings.marketplacePartnerResourceId
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.metricCategories
The name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection.
- Required: No
- Type: array
- MinValue: 0
Required parameters
| Parameter | Type | Description |
|---|
category | string | Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics. |
Optional parameters
| Parameter | Type | Description |
|---|
enabled | bool | Enable or disable the category explicitly. Default is true. |
Parameter: publicIpDiagnosticSettings.metricCategories.category
Name of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.
- Required: Yes
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.metricCategories.enabled
Enable or disable the category explicitly. Default is true.
- Required: No
- Type: bool
- MinValue: 0
Parameter: publicIpDiagnosticSettings.name
The name of diagnostic setting.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.storageAccountResourceId
Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIpDiagnosticSettings.workspaceResourceId
Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub.
- Required: No
- Type: string
- MinValue: 0
Parameter: publicIPPrefixResourceId
Resource ID of a Public IP Prefix object. This is only needed if you want your Public IP created in a PIP Prefix.
- Required: No
- Type: string
- Default:
'' - MinValue: 0
Parameter: roleAssignments
Array of role assignments to create.
- Required: No
- Type: array
- MinValue: 0
- Roles configurable by name:
'Contributor''Network Contributor''Owner''Reader''Role Based Access Control Administrator''User Access Administrator'
Required parameters
| Parameter | Type | Description |
|---|
principalId | string | The principal ID of the principal (user/group/identity) to assign the role to. |
roleDefinitionIdOrName | string | The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’. |
Optional parameters
| Parameter | Type | Description |
|---|
condition | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”. |
conditionVersion | string | Version of the condition. |
delegatedManagedIdentityResourceId | string | The Resource Id of the delegated managed identity resource. |
description | string | The description of the role assignment. |
name | string | The name (as GUID) of the role assignment. If not provided, a GUID will be generated. |
principalType | string | The principal type of the assigned principal ID. |
Parameter: roleAssignments.principalId
The principal ID of the principal (user/group/identity) to assign the role to.
- Required: Yes
- Type: string
- MinValue: 0
Parameter: roleAssignments.roleDefinitionIdOrName
The role to assign. You can provide either the display name of the role definition, the role definition GUID, or its fully qualified ID in the following format: ‘/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11’.
- Required: Yes
- Type: string
- MinValue: 0
Parameter: roleAssignments.condition
The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase “foo_storage_container”.
- Required: No
- Type: string
- MinValue: 0
Parameter: roleAssignments.conditionVersion
Version of the condition.
- Required: No
- Type: string
- Allowed:
- MinValue: 0
Parameter: roleAssignments.delegatedManagedIdentityResourceId
The Resource Id of the delegated managed identity resource.
- Required: No
- Type: string
- MinValue: 0
Parameter: roleAssignments.description
The description of the role assignment.
- Required: No
- Type: string
- MinValue: 0
Parameter: roleAssignments.name
The name (as GUID) of the role assignment. If not provided, a GUID will be generated.
- Required: No
- Type: string
- MinValue: 0
Parameter: roleAssignments.principalType
The principal type of the assigned principal ID.
- Required: No
- Type: string
- Allowed:
[
'Device'
'ForeignGroup'
'Group'
'ServicePrincipal'
'User'
]
- MinValue: 0
Tags of the resource.
- Required: No
- Type: object
- MinValue: 0
Parameter: virtualRouterAsn
An integer value that configures the ASN for this Route Server. The range of values is 0-4294967295. The default is 65515.
- Required: No
- Type: int
- Default:
65515 - MinValue: 0
- MaxValue: 4294967295
Parameter: zones
A list of availability zones denoting where the Route Server Public IP Address resource needs to come from.
- Required: No
- Type: array
- Default:
- Allowed:
- MinValue: 0
- MaxValue: 4294967295
Outputs
| Output | Type | Description |
|---|
ipAddresses | array | The IP addresses of the Route Server. |
location | string | The location the resource was deployed into. |
name | string | The name of the Route Server. |
resourceGroupName | string | The resource group the Route Server was deployed. |
resourceId | string | The Resource ID of the Route Server. |
Cross-referenced modules
This section gives you an overview of all local-referenced module files (i.e., other modules that are referenced in this module) and all remote-referenced files (i.e., Bicep modules that are referenced from a Bicep Registry or Template Specs).
| Reference | Type |
|---|
br/innofactor:avm/res/network/route-server | Remote reference |
br/public:avm/res/network/public-ip-address:0.7.0 | Remote reference |
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Changelog
Changelog
0.1.14
Changes
- Regenerated
main.json and README.md with Bicep 0.49.2 so that they match main.bicep (#206). - Released by the hardened pipeline: published only when
main.json changes, release tag created after a successful publish, GitHub Release per tag (ADR 0004, ADR 0003, ADR 0005).
Breaking Changes
0.1.13
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.12
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.11
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.10
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.9
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.8
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.7
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.6
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.5
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.4
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.3
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.2
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.1
Changes
- Republished without a change to the module. At the time the pipeline published a new patch version on every successful run, see ADR 0004.
Breaking Changes
0.1.0
Changes
- Adding missing docs for route server (#186)
- Updates to route server (#179)
- New route-server module (#178)
Breaking Changes
Version history
| Version | Published |
|---|
0.1.14 | 2026-11-16 |
0.1.13 | 2025-11-16 |
0.1.12 | 2025-11-01 |
0.1.11 | 2025-10-31 |
0.1.10 | 2025-10-16 |
0.1.9 | 2025-10-01 |
0.1.8 | 2025-09-16 |
0.1.7 | 2025-09-01 |
0.1.6 | 2025-08-16 |
0.1.5 | 2025-08-01 |
0.1.4 | 2025-07-31 |
0.1.3 | 2025-07-16 |
0.1.2 | 2025-07-01 |
0.1.1 | 2025-06-16 |
0.1.0 | 2025-06-04 |
br/innofactor:avm/res/resources/tags:0.1.1
Overview
Azure Resource Tagging Module
This module provides a standardized way to manage resource tags at both the subscription and resource group levels. It ensures consistency in tagging strategies across deployments, enabling better governance, cost management, and operational tracking.
Features Implemented
Default Behavior
By default, the module applies tags at the subscription level. If a resource group is specified, the tags will be assigned at that level instead. Tags are applied using an incremental deployment strategy, ensuring minimal disruption.
Customization
The module supports flexible customization via parameters:
- Tag Scope: Choose between subscription or resource group-level tagging.
- Tagging Strategy: Merge new tags with existing ones or replace them.
- Telemetry Control: Enable or disable telemetry for tracking module usage.
- Location Configuration: Optionally specify a deployment location.
Quick Start
Simply add the following snippet to your Bicep file to use the module. The examples in this documentation will explore the various parameters available.
module resourceTags 'br/innofactor:avm/res/resources/tags:<version>' = {
name: 'resourceTags'
scope: subscription()
params: {
tags: {
Environment: 'Production'
Owner: 'DevOpsTeam'
}
onlyUpdate: false
}
}
Parameters
| Name | Type | Required | Default | Description |
|---|
enableTelemetry | bool | No | true | Optional. Enable/Disable usage telemetry for module. |
location | string | No | "[deployment().location]" | Optional. Location for all Resources. |
onlyUpdate | bool | No | false | Optional. Instead of overwriting the existing tags, combine them with the new tags. |
resourceGroupName | string | No | "" | Optional. Name of the Resource Group to assign the tags to. If no Resource Group name is provided, and Subscription ID is provided, the module deploys at subscription level, therefore assigns the provided tags to the subscription. |
subscriptionId | string | No | "[subscription().id]" | Optional. Subscription ID of the subscription to assign the tags to. If no Resource Group name is provided, the module deploys at subscription level, therefore assigns the provided tags to the subscription. |
tags | object | No | | Optional. Tags of the resource. |
Outputs
| Name | Type | Description |
|---|
name | string | The name of the tags resource. |
resourceId | string | The resource ID of the applied tags. |
tags | object | The applied tags. |
Changelog
No changelog has been published for this module yet. See the version history below.
Version history
| Version | Published |
|---|
0.1.1 | 2026-11-09 |
0.1.0 | 2025-02-13 |