Subsections of Innofactor Verified Solutions

Module Indexes

Summary

The following table shows the number of all available, orphaned and planned Modules.

LanguageClassificationPublished 🟒 & πŸ‘€Proposed πŸ†•SUM πŸ“‡
BicepResource315
Pattern12316
Utility112
Want to contribute to AVM modules?
#
Labels
Link and description
1.Type: New Module Proposal πŸ’‘
Needs: Module Owner πŸ“£
To become the owner of a new module, see all new modules looking for owners or check out the “Looking for owners” swimlane here.
2.Status: Module Orphaned πŸ‘€To become the owner of an orphaned module, see all orphaned modules or check out the “Orphaned” swimlane here.
3.Needs: Module Contributor πŸ“£To become a co-owner or contribute to a module, see all modules looking for contributors.

For more details on “What are the different ways to contribute to AVM?”, see here.

Subsections of Module Indexes

Bicep Modules

Summary

The following table shows the number of all available, orphaned and planned Bicep Modules.

LanguageClassificationPublished 🟒 & πŸ‘€Proposed πŸ†•SUM πŸ“‡
BicepResource315
Pattern12316
Utility112
Want to contribute to AVM Bicep modules?
#LabelsLink and description
1.Type: New Module Proposal πŸ’‘
Needs: Module Owner πŸ“£
Language: Bicep πŸ’ͺ
To become the owner of a new Bicep module, see all new Bicep modules looking for owners or check out the “Looking for owners” swimlane here.
2.Status: Module Orphaned πŸ‘€ Language: Bicep πŸ’ͺTo become the owner of an orphaned Bicep module, see all orphaned Bicep modules or check out the “Orphaned” swimlane here.
3.Needs: Module Contributor πŸ“£ Language: Bicep πŸ’ͺTo become a co-owner or contribute to a Bicep module, see all Bicep modules looking for contributors.

For more details on “What are the different ways to contribute to AVM?”, see here.

Status Badges

This section gives you an overview of the latest workflow status of each AVM module in the Public Bicep Registry repository.

Note

While some pipelines can momentarily show as red, a new module version cannot be published without a successful test run. A failing test may indicate a recent change to the platform that is causing a break in the module or any intermittent errors, such as a periodic test deployment attempting to create a resource with a name already taken in another Azure region.

Subsections of Bicep

Bicep Resource Modules

Module catalog

LanguageClassificationPublished 🟒 & πŸ‘€Proposed πŸ†•SUM πŸ“‡
BicepResource315
βž• Additional information
Info

This page contains various views of the module index (catalog) for Bicep Resource Modules. To see these views, click on the expandable sections with the “βž•” sign below.

  • To see the full, unfiltered, unformatted module index on GitHub, click here.

  • To download the source CSV file, click here.

Note

Modules listed below that aren’t shown with the status of Module Available 🟒, are currently in development and are not yet available for use. For proposed modules, see the Proposed modules section below.

Published modules - 🟒 & πŸ‘€

βž• Published Modules - Module names, status and owners
No.Module NameDisplay NameStatus & VersionsOwner(s)

Proposed modules - πŸ†•

βž• Proposed Modules - Module names, status and owners
No.Module NameDisplay NameStatus & VersionsOwner(s)

All modules - πŸ“‡

βž• All Modules - Module names, status and owners
No.Module NameDisplay NameStatus & VersionsOwner(s)

Module Publication History - πŸ“…

βž• Module Publication History - Module names, status and owners
<h3 id="modules-published-in-may-2025">Modules published in May 2025</h3>
No.Module NameDisplay NameStatus & VersionsPrimary Owner
01avm/res/network/route-server(Child of )
Route Server
damianflynn
Damian Flynn

<h3 id="modules-published-in-february-2025">Modules published in February 2025</h3>
No.Module NameDisplay NameStatus & VersionsPrimary Owner
01avm/res/resources/tagsTags (Child of )damianflynn
Damian Flynn

<h3 id="modules-published-in-may-2024">Modules published in May 2024</h3>
No.Module NameDisplay NameStatus & VersionsPrimary Owner
01avm/res/custom-providers/resource-providers(Child of )
Custom Resource Provider
damianflynn
Damian Flynn
02avm/res/dashboard/grafanaGrafana (Child of )damianflynn
Damian Flynn

For Module Owners & Contributors

Note

This section is mainly intended for module owners and contributors as it contains information important for module development, such as telemetry ID prefix, and GitHub Teams for Owners & Contributors.

Module name, Telemetry ID prefix, GitHub Teams for Owners & Contributors

βž• All Modules - Module name, Telemetry ID prefix, GitHub Teams for Owners & Contributors
<td> <a href="/azure-modules/modules/res-custom-providers-resource-providers/">avm/res/custom-providers/resource-providers</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.res.customproviders-resourceproviders</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/res-dashboard-grafana/">avm/res/dashboard/grafana</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.res.dashboard-grafana</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/res-network-route-server/">avm/res/network/route-server</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.res.network-routeserver</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/res-resources-tags/">avm/res/resources/tags</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.res.resources-tags</code>
</td>
<td> </td>
<td> avm/res/security-insights/alert-rules</td>
<td> 
  <code style="white-space:normal;">46d3xbcp.res.securityinsights-alertrules</code>
</td>
<td> </td>
No.Module NameTelemetry ID prefixGitHub Teams for Module Owners and Contributors
01
02
03
04
05

Bicep Pattern Modules

Module catalog

LanguageClassificationPublished 🟒 & πŸ‘€Proposed πŸ†•SUM πŸ“‡
BicepPattern12316
βž• Additional information
Info

This page contains various views of the module index (catalog) for Bicep Pattern Modules. To see these views, click on the expandable sections with the “βž•” sign below.

  • To see the full, unfiltered, unformatted module index on GitHub, click here.

  • To download the source CSV file, click here.

Note

Modules listed below that aren’t shown with the status of Module Available 🟒, are currently in development and are not yet available for use. For proposed modules, see the Proposed modules section below.

Published modules - 🟒 & πŸ‘€

βž• Published Modules - Module names, status and owners
No.Module NameDisplay NameStatus & VersionsOwner(s)
01avm/ptn/lz/aksAzure Kubernettes Landing Zoneottolote
Otto Lote
klaudiajanusz
Klaudia Janusz
02avm/ptn/lz/atlantisAtlantis Landing Zonedamianflynn
Damian Flynn
03avm/ptn/lz/container-applianceContainer Appliance Landing Zonedamianflynn
Damian Flynn
04avm/ptn/lz/container-registryContainer Registry Landing Zonedamianflynn
Damian Flynn
05avm/ptn/lz/hubAzure Hub Landing Zoneaidanfinninnofactor
Aidan Finn
06avm/ptn/lz/smtp-relaySMTP Relay Landing Zonedamianflynn
Damian Flynn
07avm/ptn/lz/subscription-configurationAzure Subscription Configurationaidanfinninnofactor
Aidan Finn
08avm/ptn/management/cortexAzure Cortex Servicedamianflynn
Damian Flynn
09avm/ptn/management/partnerPartner Attribuationdamianflynn
Damian Flynn
10avm/ptn/management/register-providersRegister Resource Providersdamianflynn
Damian Flynn
aidanfinninnofactor
Aidan Finn
11avm/ptn/management/subscription-placementAzure Subscription Placementdamianflynn
Damian Flynn
12avm/ptn/network/spoke-networkingSpoke Networking
13avm/ptn/network/workload-networkingWorkload Network Configurationaidanfinninnofactor
Aidan Finn

Proposed modules - πŸ†•

βž• Proposed Modules - Module names, status and owners
No.Module NameDisplay NameStatus & VersionsOwner(s)
01avm/ptn/authorization/pim-role-assignmentPrivileged Identity Management Role Assignmentdamianflynn
Damian Flynn
02avm/ptn/lz/avdAzure Virtual Desktop Landing Zoneoysrindal90
Oystein Rindal
03avm/ptn/lz/managed-devops-poolAzure Managed DevOps PoolErRushfeldt
Erlend Rushfeldt

All modules - πŸ“‡

βž• All Modules - Module names, status and owners
No.Module NameDisplay NameStatus & VersionsOwner(s)
01avm/ptn/authorization/pim-role-assignmentPrivileged Identity Management Role Assignmentdamianflynn
Damian Flynn
02avm/ptn/lz/aksAzure Kubernettes Landing Zoneottolote
Otto Lote
klaudiajanusz
Klaudia Janusz
03avm/ptn/lz/atlantisAtlantis Landing Zonedamianflynn
Damian Flynn
04avm/ptn/lz/avdAzure Virtual Desktop Landing Zoneoysrindal90
Oystein Rindal
05avm/ptn/lz/container-applianceContainer Appliance Landing Zonedamianflynn
Damian Flynn
06avm/ptn/lz/container-registryContainer Registry Landing Zonedamianflynn
Damian Flynn
07avm/ptn/lz/hubAzure Hub Landing Zoneaidanfinninnofactor
Aidan Finn
08avm/ptn/lz/managed-devops-poolAzure Managed DevOps PoolErRushfeldt
Erlend Rushfeldt
09avm/ptn/lz/smtp-relaySMTP Relay Landing Zonedamianflynn
Damian Flynn
10avm/ptn/lz/subscription-configurationAzure Subscription Configurationaidanfinninnofactor
Aidan Finn
11avm/ptn/management/cortexAzure Cortex Servicedamianflynn
Damian Flynn
12avm/ptn/management/partnerPartner Attribuationdamianflynn
Damian Flynn
13avm/ptn/management/register-providersRegister Resource Providersdamianflynn
Damian Flynn
aidanfinninnofactor
Aidan Finn
14avm/ptn/management/subscription-placementAzure Subscription Placementdamianflynn
Damian Flynn
15avm/ptn/network/spoke-networkingSpoke Networking
16avm/ptn/network/workload-networkingWorkload Network Configurationaidanfinninnofactor
Aidan Finn

Module Publication History - πŸ“…

βž• Module Publication History - Module names, status and owners

❌ No modules are available yet.

For Module Owners & Contributors

Note

This section is mainly intended for module owners and contributors as it contains information important for module development, such as telemetry ID prefix, and GitHub Teams for Owners & Contributors.

Module name, Telemetry ID prefix, GitHub Teams for Owners & Contributors

βž• All Modules - Module name, Telemetry ID prefix, GitHub Teams for Owners & Contributors
<td> avm/ptn/authorization/pim-role-assignment</td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.authorization-pimroleassignment</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-aks/">avm/ptn/lz/aks</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-aks</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-atlantis/">avm/ptn/lz/atlantis</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-atlantis</code>
</td>
<td> </td>
<td> avm/ptn/lz/avd</td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-avd</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-container-appliance/">avm/ptn/lz/container-appliance</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-containerappliance</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-container-registry/">avm/ptn/lz/container-registry</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-containerregistry</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-hub/">avm/ptn/lz/hub</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-hub</code>
</td>
<td> </td>
<td> avm/ptn/lz/managed-devops-pool</td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-manageddevopspool</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-smtp-relay/">avm/ptn/lz/smtp-relay</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-smtprelay</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-lz-subscription-configuration/">avm/ptn/lz/subscription-configuration</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.lz-subscriptionconfiguration</code>
</td>
<td> </td>
<td> avm/ptn/management/cortex</td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.management-cortex</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-management-partner/">avm/ptn/management/partner</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.partner</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-management-register-providers/">avm/ptn/management/register-providers</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.management-registerproviders</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-management-subscription-placement/">avm/ptn/management/subscription-placement</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.management-subscriptionplacement</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-network-spoke-networking/">avm/ptn/network/spoke-networking</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.network-spokenetworking</code>
</td>
<td> </td>
<td> <a href="/azure-modules/modules/ptn-network-workload-networking/">avm/ptn/network/workload-networking</a></td>
<td> 
  <code style="white-space:normal;">46d3xbcp.ptn.network-workloadnetworking</code>
</td>
<td> </td>
No.Module NameTelemetry ID prefixGitHub Teams for Module Owners and Contributors
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16

Published modules

Generated from the registry catalog on 2026-11-25.

ModuleLatestVersions
avm/ptn/lz/aks0.2.05
avm/ptn/lz/atlantis0.1.01
avm/ptn/lz/container-appliance0.2.14
avm/ptn/lz/container-registry0.3.08
avm/ptn/lz/hub0.1.56
avm/ptn/lz/smtp-relay0.2.03
avm/ptn/lz/subscription-configuration0.1.128
avm/ptn/management/partner0.1.12
avm/ptn/management/register-providers0.1.1213
avm/ptn/management/subscription-placement0.1.910
avm/ptn/network/spoke-networking0.4.01
avm/ptn/network/workload-networking0.4.1112
avm/res/custom-providers/resource-providers0.1.01
avm/res/dashboard/grafana0.2.05
avm/res/network/route-server0.1.1415
avm/res/resources/tags0.1.12

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.

Features

  • AKS Cluster: Deploys an AKS cluster with customizable configuration.
  • System Node Pool: Configurable system node pool with preset sizing options.
  • User Node Pool (Optional): Additional user node pool with customizable settings.
  • Azure Container Registry (ACR): Deploys an ACR instance and configures AKS-ACR integration.
  • Azure Key Vault: Provisions a Key Vault for secrets management.
  • AAD Integration: Supports Azure Active Directory integration for AKS authentication.
  • Network Configuration: Configurable network plugin, policy, and CIDR ranges.
  • Monitoring: Integrates with Azure Monitor and Log Analytics.
  • Security Features: Supports RBAC, managed identities, and private clusters.

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

Resource TypeAPI Version
Microsoft.Authorization/locks2020-05-01
Microsoft.Authorization/roleAssignments2022-04-01
Microsoft.ContainerRegistry/registries2023-06-01-preview
Microsoft.ContainerRegistry/registries/cacheRules2023-06-01-preview
Microsoft.ContainerRegistry/registries/credentialSets2023-11-01-preview
Microsoft.ContainerRegistry/registries/replications2023-06-01-preview
Microsoft.ContainerRegistry/registries/scopeMaps2023-06-01-preview
Microsoft.ContainerRegistry/registries/webhooks2023-06-01-preview
Microsoft.ContainerService/managedClusters2025-05-02-preview
Microsoft.ContainerService/managedClusters/agentPools2025-05-02-preview
Microsoft.ContainerService/managedClusters/maintenanceConfigurations2025-05-01
Microsoft.Insights/diagnosticSettings2021-05-01-preview
Microsoft.KeyVault/vaults2022-07-01
Microsoft.KeyVault/vaults/accessPolicies2022-07-01
Microsoft.KeyVault/vaults/keys2022-07-01
Microsoft.KeyVault/vaults/secrets2022-07-01
Microsoft.KubernetesConfiguration/extensions2024-11-01
Microsoft.KubernetesConfiguration/fluxConfigurations2025-04-01
Microsoft.ManagedIdentity/userAssignedIdentities2023-01-31
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials2023-01-31
Microsoft.Network/privateEndpoints2023-11-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-11-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/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:

  • Azure Kubernetes Service (AKS)

    • Configured with Azure Active Directory (AAD) integration
    • Role-based access control (RBAC) enabled
    • Network plugin set to azure
    • Network policy set to azure
    • Kubernetes version set to 1.29
    • Public Network Access enabled
    • AKS cluster SKU is set to standard
    • Load balancer SKU is set to standard
    • Agent Pool configuration with 3 nodes, VM size Standard_D2s_v2 and OS type Linux
  • Azure Container Registry

    • Used for container image storage
    • Standard SKU
  • Azure Key Vault

    • Used for storing secrets
    • Premium SKU
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:

  • Azure Kubernetes Service (AKS)

    • Configured with Azure Active Directory (AAD) integration
    • Role-based access control (RBAC) enabled
    • Integrated role assignments for secure access
    • Network plugin set to azure
    • Network policy set to azure
    • Web application routing enabled
    • dnsPrefix set to dep-${namePrefix}-dns-${serviceShort}
    • Kubernetes version set to 1.29
    • Public Network Access enabled
    • AKS cluster SKU is set to Free
    • Load balancer SKU is set to standard
    • Agent pool configuration
      • User pool: VM scale set, Standard_DS2_v2, maxPods 30, maxSurge 33%
      • System pool: 3 nodes, VM size Standard_DS2_v2, minCount 3, maxCount 5, enableAutoScaling true, availabilityZones 1, 2, 3
  • Azure Container Registry

    • Used for container image storage
    • Basic SKU
    • Integrated role assignments for secure access
  • Azure Key Vault

    • Used for storing secrets
    • Premium SKU
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:

  • Azure Kubernetes Service (AKS)

    • Configured with Azure Active Directory (AAD) integration
    • Role-based access control (RBAC) enabled
    • Integrated role assignments for secure access
    • Network plugin set to azure
    • Network policy set to azure
    • Web application routing enabled
    • dnsPrefix set to dep-${namePrefix}-dns-${serviceShort}
    • Kubernetes version set to 1.29
    • Public Network Access enabled
    • AKS cluster SKU is set to Standard
    • Load balancer SKU is set to standard
    • Agent pool configuration
      • User pool: VM scale set, Standard_DS2_v2, maxPods 30, maxSurge 33%
      • System pool: 3 nodes, VM size Standard_DS2_v2, minCount 3, maxCount 5, enableAutoScaling true, availabilityZones 1, 2, 3
  • Azure Container Registry

    • Used for container image storage
    • Standard SKU
    • Integrated role assignments for secure access
  • Azure Key Vault

    • Used for storing secrets
    • Premium SKU
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| GeoReplication
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
    }
    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

ParameterTypeDescription
containerRegistryNamestringName of your Azure Container Registry.
keyVaultNamestringName of the Key Vault. Must be globally unique.
monitoringWorkspaceResourceIdstringResource ID of the monitoring log analytics workspace.
namestringThe name of the parent managed cluster. Required if the template is used in a standalone deployment.
principalIdstringId of the user or app to assign application roles.

Conditional parameters

ParameterTypeDescription
appGatewayResourceIdstringSpecifies the resource ID of connected application gateway. Required if ingressApplicationGatewayEnabled is set to true.

Optional parameters

ParameterTypeDescription
aadProfileobjectEnable Azure Active Directory integration.
acrPublicNetworkAccessstringWhether public network access is allowed for the container registry only. Defaults to the value of publicNetworkAccess. Disabling it requires the acrSku to be Premium.
acrReplicationsarrayGeo-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.
acrSkustringTier of your Azure container registry.
agentPoolConfigarrayCustom configuration of user node pool.
agentPoolSizestringThe User Pool Preset sizing.
aksClusterRoleAssignmentNamestringThe name (as GUID) of the role assignment. If not provided, a GUID will be generated.
autoNodeOsUpgradeProfileUpgradeChannelstringAuto-upgrade channel on the Node Os.
containerRegistryRoleNamestringThe name (as GUID) of the role assignment. If not provided, a GUID will be generated.
disableLocalAccountsboolIf set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled.
dnsPrefixstringSpecifies the DNS prefix specified when creating the managed cluster.
dnsServiceIPstringSpecifies the IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
enableAzureRbacboolEnable RBAC using AAD.
enableKeyvaultSecretsProviderboolSpecifies whether the KeyvaultSecretsProvider add-on is enabled or not.
enablePurgeProtectionboolProvide ’true’ to enable Key Vault’s purge protection feature.
enableRbacAuthorizationboolProperty 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.
enableTelemetryboolEnable/Disable usage telemetry for module.
enableVaultForDeploymentboolSpecifies if the vault is enabled for deployment by script or compute.
enableVaultForTemplateDeploymentboolSpecifies if the vault is enabled for a template deployment.
kubernetesVersionstringKubernetes Version.
loadBalancerSkustringSpecifies the sku of the load balancer used by the virtual machine scale sets used by nodepools.
locationstringSpecifies the location of AKS cluster. It picks up Resource Group’s location by default.
managedIdentityResourceIdstringThe 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.
networkDataplanestringNetwork dataplane used in the Kubernetes cluster. Not compatible with kubenet network plugin.
networkPluginstringNetwork plugin used for building the Kubernetes network.
networkPluginModestringNetwork plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin.
networkPolicystringSpecifies the network policy used for building Kubernetes network. - calico or azure.
nodeResourceGroupNamestringThe name of the resource group for the managed resources of the AKS cluster.
podCidrstringSpecifies the CIDR notation IP range from which to assign pod IPs when kubenet is used.
principalTypestringThe type of principal to assign application roles.
publicNetworkAccessstringWhether 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’.
scopeMapsarrayScope maps setting.
serviceCidrstringA CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
skuTierstringTier of a managed cluster SKU.
sshPublicKeystringSpecifies the SSH RSA public key string for the Linux nodes.
systemPoolConfigarrayCustom configuration of system node pool.
systemPoolSizestringThe System Pool Preset sizing.
tagsobjectCustom tags to apply to the AKS resources.
webApplicationRoutingEnabledboolSpecifies 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.

  • Required: No
  • Type: string
Parameter: aadProfile

Enable Azure Active Directory integration.

  • Required: No
  • Type: object

Required parameters

ParameterTypeDescription
aadProfileEnableAzureRBACboolSpecifies whether to enable Azure RBAC for Kubernetes authorization.
aadProfileManagedboolSpecifies whether to enable managed AAD integration.

Optional parameters

ParameterTypeDescription
aadProfileAdminGroupObjectIDsarraySpecifies the AAD group object IDs that will have admin role of the cluster.
aadProfileClientAppIDstringThe client AAD application ID.
aadProfileServerAppIDstringThe server AAD application ID.
aadProfileServerAppSecretstringThe server AAD application secret.
aadProfileTenantIdstringSpecifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication.
Parameter: aadProfile.aadProfileEnableAzureRBAC

Specifies whether to enable Azure RBAC for Kubernetes authorization.

  • Required: Yes
  • Type: bool
Parameter: aadProfile.aadProfileManaged

Specifies whether to enable managed AAD integration.

  • Required: Yes
  • Type: bool
Parameter: aadProfile.aadProfileAdminGroupObjectIDs

Specifies the AAD group object IDs that will have admin role of the cluster.

  • Required: No
  • Type: array
Parameter: aadProfile.aadProfileClientAppID

The client AAD application ID.

  • Required: No
  • Type: string
Parameter: aadProfile.aadProfileServerAppID

The server AAD application ID.

  • Required: No
  • Type: string
Parameter: aadProfile.aadProfileServerAppSecret

The server AAD application secret.

  • Required: No
  • Type: string
Parameter: aadProfile.aadProfileTenantId

Specifies the tenant ID of the Azure Active Directory used by the AKS cluster for authentication.

  • Required: No
  • Type: string
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:
    [
      'Disabled'
      'Enabled'
    ]
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.

  • Required: No
  • Type: array
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: No
  • Type: array

Required parameters

ParameterTypeDescription
namestringThe name of the agent pool.

Optional parameters

ParameterTypeDescription
availabilityZonesarrayThe availability zones of the agent pool.
countintThe number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
enableAutoScalingboolWhether to enable auto-scaling for the agent pool.
enableDefaultTelemetryboolThe enable default telemetry of the agent pool.
enableEncryptionAtHostboolWhether to enable encryption at host for the agent pool.
enableFIPSboolWhether to enable FIPS for the agent pool.
enableNodePublicIPboolWhether to enable node public IP for the agent pool.
enableSecureBootboolSecure 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.
enableUltraSSDboolWhether to enable Ultra SSD for the agent pool.
enableVTPMboolvTPM 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.
gpuInstanceProfilestringThe GPU instance profile of the agent pool.
kubeletDiskTypestringThe kubelet disk type of the agent pool.
linuxOSConfigobjectThe Linux OS configuration of the agent pool.
maxCountintThe maximum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
maxPodsintThe maximum number of pods that can run on a node.
maxSurgestringThe maximum number of nodes that can be created during an upgrade.
minCountintThe minimum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
minPodsintThe minimum number of pods that can run on a node.
modestringThe mode of the agent pool.
nodeLabelsobjectThe node labels of the agent pool.
nodePublicIpPrefixResourceIdstringThe node public IP prefix ID of the agent pool.
nodeTaintsarrayThe node taints of the agent pool.
orchestratorVersionstringThe Kubernetes version of the agent pool.
osDiskSizeGBintThe OS disk size in GB of the agent pool.
osDiskTypestringThe OS disk type of the agent pool.
osSKUstringThe OS SKU of the agent pool.
osTypestringThe OS type of the agent pool.
podSubnetResourceIdstringThe pod subnet ID of the agent pool.
proximityPlacementGroupResourceIdstringThe proximity placement group resource ID of the agent pool.
scaleDownModestringThe scale down mode of the agent pool.
scaleSetEvictionPolicystringThe scale set eviction policy of the agent pool.
scaleSetPrioritystringThe scale set priority of the agent pool.
sourceResourceIdstringThe source resource ID to create the agent pool from.
spotMaxPriceintThe spot max price of the agent pool.
sshAccessstringSSH access method of an agent pool.
tagsobjectThe tags of the agent pool.
typestringThe type of the agent pool.
vmSizestringThe VM size of the agent pool.
vnetSubnetResourceIdstringThe VNet subnet ID of the agent pool.
windowsProfileobjectThe Windows profile of the agent pool.
workloadRuntimestringThe 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.

  • Required: No
  • Type: array
Parameter: agentPoolConfig.count

The number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).

  • Required: No
  • Type: int
Parameter: agentPoolConfig.enableAutoScaling

Whether to enable auto-scaling for the agent pool.

  • Required: No
  • Type: bool
Parameter: agentPoolConfig.enableDefaultTelemetry

The enable default telemetry of the agent pool.

  • Required: No
  • Type: bool
Parameter: agentPoolConfig.enableEncryptionAtHost

Whether to enable encryption at host for the agent pool.

  • Required: No
  • Type: bool
Parameter: agentPoolConfig.enableFIPS

Whether to enable FIPS for the agent pool.

  • Required: No
  • Type: bool
Parameter: agentPoolConfig.enableNodePublicIP

Whether to enable node public IP for the agent pool.

  • Required: No
  • Type: bool
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.

  • Required: No
  • Type: bool
Parameter: agentPoolConfig.enableUltraSSD

Whether to enable Ultra SSD for the agent pool.

  • Required: No
  • Type: bool
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.

  • Required: No
  • Type: bool
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.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.linuxOSConfig

The Linux OS configuration of the agent pool.

  • Required: No
  • Type: object
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).

  • Required: No
  • Type: int
Parameter: agentPoolConfig.maxPods

The maximum number of pods that can run on a node.

  • Required: No
  • Type: int
Parameter: agentPoolConfig.maxSurge

The maximum number of nodes that can be created during an upgrade.

  • Required: No
  • Type: string
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).

  • Required: No
  • Type: int
Parameter: agentPoolConfig.minPods

The minimum number of pods that can run on a node.

  • Required: No
  • Type: int
Parameter: agentPoolConfig.mode

The mode of the agent pool.

  • Required: No
  • Type: string
  • Allowed:
    [
      'System'
      'User'
    ]
Parameter: agentPoolConfig.nodeLabels

The node labels of the agent pool.

  • Required: No
  • Type: object
Parameter: agentPoolConfig.nodePublicIpPrefixResourceId

The node public IP prefix ID of the agent pool.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.nodeTaints

The node taints of the agent pool.

  • Required: No
  • Type: array
Parameter: agentPoolConfig.orchestratorVersion

The Kubernetes version of the agent pool.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.osDiskSizeGB

The OS disk size in GB of the agent pool.

  • Required: No
  • Type: int
Parameter: agentPoolConfig.osDiskType

The OS disk type of the agent pool.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.osSKU

The OS SKU of the agent pool.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.osType

The OS type of the agent pool.

  • Required: No
  • Type: string
  • Allowed:
    [
      'Linux'
      'Windows'
    ]
Parameter: agentPoolConfig.podSubnetResourceId

The pod subnet ID of the agent pool.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.proximityPlacementGroupResourceId

The proximity placement group resource ID of the agent pool.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.spotMaxPrice

The spot max price of the agent pool.

  • Required: No
  • Type: int
Parameter: agentPoolConfig.sshAccess

SSH access method of an agent pool.

  • Required: No
  • Type: string
  • Allowed:
    [
      'Disabled'
      'LocalUser'
    ]
Parameter: agentPoolConfig.tags

The tags of the agent pool.

  • Required: No
  • Type: object
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.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.vnetSubnetResourceId

The VNet subnet ID of the agent pool.

  • Required: No
  • Type: string
Parameter: agentPoolConfig.windowsProfile

The Windows profile of the agent pool.

  • Required: No
  • Type: object
Parameter: agentPoolConfig.workloadRuntime

The workload runtime of the agent pool.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: string
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:
    [
      'basic'
      'standard'
    ]
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:
    [
      'azure'
      'cilium'
    ]
Parameter: networkPlugin

Network plugin used for building the Kubernetes network.

  • Required: No
  • Type: string
  • Default: 'azure'
  • Allowed:
    [
      'azure'
      'kubenet'
    ]
Parameter: networkPluginMode

Network plugin mode used for building the Kubernetes network. Not compatible with kubenet network plugin.

  • Required: No
  • Type: string
  • Allowed:
    [
      'overlay'
    ]
Parameter: networkPolicy

Specifies the network policy used for building Kubernetes network. - calico or azure.

  • Required: No
  • Type: string
  • Default: 'azure'
  • Allowed:
    [
      'azure'
      'calico'
    ]
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.

  • Required: No
  • Type: string
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:
    [
      'Disabled'
      'Enabled'
    ]
Parameter: scopeMaps

Scope maps setting.

  • Required: No
  • Type: array

Required parameters

ParameterTypeDescription
actionsarrayThe list of scoped permissions for registry artifacts.

Optional parameters

ParameterTypeDescription
descriptionstringThe user friendly description of the scope map.
namestringThe name of the scope map.
Parameter: scopeMaps.actions

The list of scoped permissions for registry artifacts.

  • Required: Yes
  • Type: array
Parameter: scopeMaps.description

The user friendly description of the scope map.

  • Required: No
  • Type: string
Parameter: scopeMaps.name

The name of the scope map.

  • Required: No
  • Type: string
Parameter: serviceCidr

A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: string
Parameter: systemPoolConfig

Custom configuration of system node pool.

  • Required: No
  • Type: array

Required parameters

ParameterTypeDescription
namestringThe name of the agent pool.

Optional parameters

ParameterTypeDescription
availabilityZonesarrayThe availability zones of the agent pool.
countintThe number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
enableAutoScalingboolWhether to enable auto-scaling for the agent pool.
enableDefaultTelemetryboolThe enable default telemetry of the agent pool.
enableEncryptionAtHostboolWhether to enable encryption at host for the agent pool.
enableFIPSboolWhether to enable FIPS for the agent pool.
enableNodePublicIPboolWhether to enable node public IP for the agent pool.
enableSecureBootboolSecure 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.
enableUltraSSDboolWhether to enable Ultra SSD for the agent pool.
enableVTPMboolvTPM 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.
gpuInstanceProfilestringThe GPU instance profile of the agent pool.
kubeletDiskTypestringThe kubelet disk type of the agent pool.
linuxOSConfigobjectThe Linux OS configuration of the agent pool.
maxCountintThe maximum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
maxPodsintThe maximum number of pods that can run on a node.
maxSurgestringThe maximum number of nodes that can be created during an upgrade.
minCountintThe minimum number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).
minPodsintThe minimum number of pods that can run on a node.
modestringThe mode of the agent pool.
nodeLabelsobjectThe node labels of the agent pool.
nodePublicIpPrefixResourceIdstringThe node public IP prefix ID of the agent pool.
nodeTaintsarrayThe node taints of the agent pool.
orchestratorVersionstringThe Kubernetes version of the agent pool.
osDiskSizeGBintThe OS disk size in GB of the agent pool.
osDiskTypestringThe OS disk type of the agent pool.
osSKUstringThe OS SKU of the agent pool.
osTypestringThe OS type of the agent pool.
podSubnetResourceIdstringThe pod subnet ID of the agent pool.
proximityPlacementGroupResourceIdstringThe proximity placement group resource ID of the agent pool.
scaleDownModestringThe scale down mode of the agent pool.
scaleSetEvictionPolicystringThe scale set eviction policy of the agent pool.
scaleSetPrioritystringThe scale set priority of the agent pool.
sourceResourceIdstringThe source resource ID to create the agent pool from.
spotMaxPriceintThe spot max price of the agent pool.
sshAccessstringSSH access method of an agent pool.
tagsobjectThe tags of the agent pool.
typestringThe type of the agent pool.
vmSizestringThe VM size of the agent pool.
vnetSubnetResourceIdstringThe VNet subnet ID of the agent pool.
windowsProfileobjectThe Windows profile of the agent pool.
workloadRuntimestringThe 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.

  • Required: No
  • Type: array
Parameter: systemPoolConfig.count

The number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive).

  • Required: No
  • Type: int
Parameter: systemPoolConfig.enableAutoScaling

Whether to enable auto-scaling for the agent pool.

  • Required: No
  • Type: bool
Parameter: systemPoolConfig.enableDefaultTelemetry

The enable default telemetry of the agent pool.

  • Required: No
  • Type: bool
Parameter: systemPoolConfig.enableEncryptionAtHost

Whether to enable encryption at host for the agent pool.

  • Required: No
  • Type: bool
Parameter: systemPoolConfig.enableFIPS

Whether to enable FIPS for the agent pool.

  • Required: No
  • Type: bool
Parameter: systemPoolConfig.enableNodePublicIP

Whether to enable node public IP for the agent pool.

  • Required: No
  • Type: bool
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.

  • Required: No
  • Type: bool
Parameter: systemPoolConfig.enableUltraSSD

Whether to enable Ultra SSD for the agent pool.

  • Required: No
  • Type: bool
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.

  • Required: No
  • Type: bool
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.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.linuxOSConfig

The Linux OS configuration of the agent pool.

  • Required: No
  • Type: object
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).

  • Required: No
  • Type: int
Parameter: systemPoolConfig.maxPods

The maximum number of pods that can run on a node.

  • Required: No
  • Type: int
Parameter: systemPoolConfig.maxSurge

The maximum number of nodes that can be created during an upgrade.

  • Required: No
  • Type: string
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).

  • Required: No
  • Type: int
Parameter: systemPoolConfig.minPods

The minimum number of pods that can run on a node.

  • Required: No
  • Type: int
Parameter: systemPoolConfig.mode

The mode of the agent pool.

  • Required: No
  • Type: string
  • Allowed:
    [
      'System'
      'User'
    ]
Parameter: systemPoolConfig.nodeLabels

The node labels of the agent pool.

  • Required: No
  • Type: object
Parameter: systemPoolConfig.nodePublicIpPrefixResourceId

The node public IP prefix ID of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.nodeTaints

The node taints of the agent pool.

  • Required: No
  • Type: array
Parameter: systemPoolConfig.orchestratorVersion

The Kubernetes version of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.osDiskSizeGB

The OS disk size in GB of the agent pool.

  • Required: No
  • Type: int
Parameter: systemPoolConfig.osDiskType

The OS disk type of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.osSKU

The OS SKU of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.osType

The OS type of the agent pool.

  • Required: No
  • Type: string
  • Allowed:
    [
      'Linux'
      'Windows'
    ]
Parameter: systemPoolConfig.podSubnetResourceId

The pod subnet ID of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.proximityPlacementGroupResourceId

The proximity placement group resource ID of the agent pool.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.spotMaxPrice

The spot max price of the agent pool.

  • Required: No
  • Type: int
Parameter: systemPoolConfig.sshAccess

SSH access method of an agent pool.

  • Required: No
  • Type: string
  • Allowed:
    [
      'Disabled'
      'LocalUser'
    ]
Parameter: systemPoolConfig.tags

The tags of the agent pool.

  • Required: No
  • Type: object
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.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.vnetSubnetResourceId

The VNet subnet ID of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolConfig.windowsProfile

The Windows profile of the agent pool.

  • Required: No
  • Type: object
Parameter: systemPoolConfig.workloadRuntime

The workload runtime of the agent pool.

  • Required: No
  • Type: string
Parameter: systemPoolSize

The System Pool Preset sizing.

  • Required: No
  • Type: string
  • Default: 'Standard'
  • Allowed:
    [
      'CostOptimised'
      'Custom'
      'HighSpec'
      'Standard'
    ]
Parameter: tags

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

OutputTypeDescription
containerRegistryLoginServerstringThe login server for the container registry.
containerRegistryNamestringThe resource name of the ACR.
managedClusterClientIdstringThe Client ID of the AKS identity.
managedClusterNamestringThe resource name of the AKS cluster.
managedClusterObjectIdstringThe Object ID of the AKS identity.
managedClusterResourceIdstringThe resource ID of the AKS cluster.
managedIdentityClientIdstringThe client ID of the managed identity used by the AKS cluster.
managedIdentityPrincipalIdstringThe principal ID of the managed identity used by the AKS cluster.
managedIdentityResourceIdstringThe resource ID of the managed identity used by the AKS cluster.
resourceGroupNamestringThe 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).

ReferenceType
br/public:avm/res/container-registry/registry:0.5.1Remote reference
br/public:avm/res/container-service/managed-cluster:0.11.1Remote reference
br/public:avm/res/key-vault/vault:0.9.0Remote reference
br/public:avm/res/managed-identity/user-assigned-identity:0.4.0Remote 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
  • None

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
  • None

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
  • None

0.1.0

Changes
  • AKS MVP Scaffolding (#128)
Breaking Changes
  • None

Version history

VersionPublished
0.2.02026-11-16
0.1.32025-04-01
0.1.22025-03-31
0.1.12025-03-16
0.1.02025-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.

Resource Types

Resource TypeAPI Version
Microsoft.Authorization/locks2020-05-01
Microsoft.Authorization/roleAssignments2022-04-01
Microsoft.Automanage/configurationProfileAssignments2022-05-04
Microsoft.Compute/disks2024-03-02
Microsoft.Compute/virtualMachines2024-07-01
Microsoft.Compute/virtualMachines/extensions2022-11-01
Microsoft.Compute/virtualMachineScaleSets2024-07-01
Microsoft.DevTestLab/schedules2018-09-15
Microsoft.GuestConfiguration/guestConfigurationAssignments2020-06-25
Microsoft.Insights/actionGroups2023-01-01
Microsoft.Insights/dataCollectionRuleAssociations2023-03-11
Microsoft.Insights/dataCollectionRuleAssociations2022-06-01
Microsoft.Insights/dataCollectionRules2023-03-11
Microsoft.Insights/diagnosticSettings2021-05-01-preview
Microsoft.Insights/metricAlerts2018-03-01
Microsoft.Insights/scheduledQueryRules2023-12-01
Microsoft.Insights/scheduledQueryRules2025-01-01-preview
Microsoft.Insights/workbooks2023-06-01
Microsoft.KeyVault/vaults2024-11-01
Microsoft.KeyVault/vaults/accessPolicies2024-11-01
Microsoft.KeyVault/vaults/keys2024-11-01
Microsoft.KeyVault/vaults/secrets2024-11-01
Microsoft.KeyVault/vaults/secrets2023-07-01
Microsoft.Maintenance/configurationAssignments2023-04-01
Microsoft.Maintenance/maintenanceConfigurations2023-04-01
Microsoft.ManagedIdentity/userAssignedIdentities2024-11-30
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials2024-11-30
Microsoft.Network/loadBalancers2024-05-01
Microsoft.Network/natGateways2023-04-01
Microsoft.Network/networkInterfaces2024-05-01
Microsoft.Network/networkSecurityGroups2023-11-01
Microsoft.Network/privateEndpoints2023-11-01
Microsoft.Network/privateEndpoints2024-10-01
Microsoft.Network/privateEndpoints2024-05-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-05-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-11-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-10-01
Microsoft.Network/publicIPAddresses2024-05-01
Microsoft.Network/publicIPAddresses2023-09-01
Microsoft.Network/publicIPPrefixes2023-09-01
Microsoft.Network/routeTables2024-05-01
Microsoft.Network/virtualNetworks2024-05-01
Microsoft.Network/virtualNetworks/subnets2024-05-01
Microsoft.Network/virtualNetworks/virtualNetworkPeerings2024-01-01
Microsoft.OperationalInsights/workspaces2025-02-01
Microsoft.OperationalInsights/workspaces/dataExports2025-02-01
Microsoft.OperationalInsights/workspaces/dataSources2025-02-01
Microsoft.OperationalInsights/workspaces/linkedServices2025-02-01
Microsoft.OperationalInsights/workspaces/linkedStorageAccounts2025-02-01
Microsoft.OperationalInsights/workspaces/savedSearches2025-02-01
Microsoft.OperationalInsights/workspaces/storageInsightConfigs2025-02-01
Microsoft.OperationalInsights/workspaces/tables2025-02-01
Microsoft.OperationsManagement/solutions2015-11-01-preview
Microsoft.RecoveryServices/vaults2024-04-01
Microsoft.RecoveryServices/vaults/backupconfig2023-01-01
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems2023-01-01
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems2024-10-01
Microsoft.RecoveryServices/vaults/backupPolicies2024-10-01
Microsoft.RecoveryServices/vaults/backupstorageconfig2023-01-01
Microsoft.RecoveryServices/vaults/replicationAlertSettings2022-10-01
Microsoft.RecoveryServices/vaults/replicationFabrics2022-10-01
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers2022-10-01
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings2022-10-01
Microsoft.RecoveryServices/vaults/replicationPolicies2023-06-01
Microsoft.Resources/resourceGroups2021-04-01
Microsoft.SecurityInsights/onboardingStates2024-03-01
Microsoft.Storage/storageAccounts2025-06-01
Microsoft.Storage/storageAccounts2023-05-01
Microsoft.Storage/storageAccounts/blobServices2025-01-01
Microsoft.Storage/storageAccounts/blobServices2022-09-01
Microsoft.Storage/storageAccounts/blobServices/containers2022-09-01
Microsoft.Storage/storageAccounts/blobServices/containers2025-01-01
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies2022-09-01
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies2025-01-01
Microsoft.Storage/storageAccounts/fileServices2023-04-01
Microsoft.Storage/storageAccounts/fileServices2025-06-01
Microsoft.Storage/storageAccounts/fileServices/shares2023-01-01
Microsoft.Storage/storageAccounts/fileServices/shares2025-01-01
Microsoft.Storage/storageAccounts/localUsers2025-06-01
Microsoft.Storage/storageAccounts/localUsers2023-04-01
Microsoft.Storage/storageAccounts/managementPolicies2025-06-01
Microsoft.Storage/storageAccounts/managementPolicies2023-01-01
Microsoft.Storage/storageAccounts/objectReplicationPolicies2025-01-01
Microsoft.Storage/storageAccounts/queueServices2025-06-01
Microsoft.Storage/storageAccounts/queueServices2023-04-01
Microsoft.Storage/storageAccounts/queueServices/queues2025-06-01
Microsoft.Storage/storageAccounts/queueServices/queues2023-04-01
Microsoft.Storage/storageAccounts/tableServices2025-06-01
Microsoft.Storage/storageAccounts/tableServices2023-04-01
Microsoft.Storage/storageAccounts/tableServices/tables2023-04-01
Microsoft.Storage/storageAccounts/tableServices/tables2025-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

ParameterTypeDescription
adoUserstringAzure DevOps username Atlantis authenticates to the API as.
adoWebhookUserstringBasic-auth username for inbound Azure DevOps webhook calls.
atlantisExternalHostnamestringPublic hostname the appliance is reached at.
azureDevOpsPatsecurestringAzure DevOps Personal Access Token.
azureDevOpsWebhookPasswordsecurestringAzure DevOps inbound webhook basic-auth password.
entraTenantIdstringEntra tenant ID used as the OIDC issuer for oauth2-proxy.
inboundAllowedCidrstringCIDR allowed inbound to the appliance on oauth2ProxyPort: the publishing gateway’s subnet.
oauth2ClientIdstringEntra App Registration client ID for oauth2-proxy β€” PREREQUISITE, not created by this template.
oauth2ClientSecretsecurestringEntra App Registration client secret for oauth2-proxy.
oauth2ProxyAllowedEmailDomainsstringComma-separated list of email domains oauth2-proxy allows through.
oauth2ProxyCookieSecretsecurestringoauth2-proxy session cookie encryption secret.
repoAllowliststringRepository allowlist pattern for Atlantis.
sshPublicKeystringSSH public key for the admin account.
vnetAddressPrefixstringAddress space for the appliance’s own VNet. See the container-appliance module for the full description.

Conditional parameters

ParameterTypeDescription
existingIdentityPrincipalIdstringRequired if createNewManagedIdentity is false. Principal ID of the existing identity.
existingIdentityResourceIdstringRequired if createNewManagedIdentity is false. Resource ID of the existing identity to attach.
registryTokensecurestringRequired 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

ParameterTypeDescription
activeInstanceintactiveStandby 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.
adminUsernamestringLocal admin username on the appliance VM.
alertEmailAddressesarrayEmail addresses for the appliance action group (see the container-appliance module).
applianceSubnetNewBitsintPrefix 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.
armSubscriptionIdstringSubscription ID exported to Terraform as ARM_SUBSCRIPTION_ID. Empty omits it.
atlantisImagestringThe 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).
availabilityZoneintAvailability zone for the appliance. See the container-appliance module.
containerRegistryobjectHow 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.
createNatGatewayboolCreate 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.
createNewManagedIdentityboolCreate a new user-assigned identity (true, the product default) or attach an existing one (false).
dataDiskSizeGBintSize in GB of the dedicated Atlantis data disk.
defaultRouteNextHopIpAddressstringNext-hop IP for a 0.0.0.0/0 route on the appliance subnet. See the container-appliance module.
dnsServersarrayCustom DNS servers for the appliance VNet.
enableBackupboolBack 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.
enableKeyVaultPurgeProtectionboolPurge protection on the appliance Key Vault. Default true.
enablePatchScheduleboolAttach the VM to the patch window. False leaves patching to Azure, at times Azure chooses.
enablePolicyChecksboolStart Atlantis with –enable-policy-checks. See atlantis.bicep.
enableTelemetryboolEnable/Disable usage telemetry for module.
hostPrivateIpAddressstringStatic private IP for the appliance VM, inside the appliance’s own subnet. See the container-appliance module for the default.
itsmWebhookUristringITSM webhook URI for the action group.
keyVaultNamestringName of the appliance Key Vault. Empty derives it from the name. See the container-appliance module.
locationstringAzure region to deploy the resources.
lockobjectA 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.
maintenanceWindowobjectMonthly in-guest patch window (Azure Update Manager maintenance configuration). See the container-appliance module for the default and why the schedule is dedicated.
namestringPrefix for resource names, and the name of the single resource group created.
oauth2ProxyImagestringThe oauth2-proxy image, as <registry>/<repository>:<tag>@sha256:<digest>. The default is the private mirror of oauth2-proxy v7.15.5.
oauth2ProxyOidcEmailClaimstringThe ID-token claim oauth2-proxy treats as the user’s email. See atlantis.bicep.
oauth2ProxyPortintPort oauth2-proxy listens on.
protectStatefulResourcesboolCanNotDelete 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.
repoConfigstringContent 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.
roleAssignmentsarrayAdditional role assignments to grant on the resource group.
scaleModestringactiveStandby (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.
tagsobjectTags applied to every resource.
terraformLinuxAmd64Sha256stringSHA-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.
terraformVersionstringDefault Terraform version Atlantis pins per plan.
virtualNetworkPeeringsarrayVNet peerings in the AVM shape. A remote side is a write outside the appliance resource group.
vmSizestringVM size. MUST NOT be a burstable (B-series) SKU β€” see atlantis.bicep.
workspaceResourceIdstringResource 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:
    [
      1
      2
    ]
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:
    [
      1
      2
      3
    ]
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

ParameterTypeDescription
modestringHow to authenticate: anonymous, managedIdentity or keyVaultToken.
serverstringRegistry server name, for example contoso.azurecr.io. Empty with mode anonymous.

Conditional parameters

ParameterTypeDescription
tokenSecretNamestringRequired if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token.

Optional parameters

ParameterTypeDescription
registryResourceIdstringmanagedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.
tokenUsernamestringkeyVaultToken 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.

  • Required: No
  • Type: string
Parameter: containerRegistry.registryResourceId

managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.

  • Required: No
  • Type: string
Parameter: containerRegistry.tokenUsername

keyVaultToken only: the user name that goes with the token.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: object

Optional parameters

ParameterTypeDescription
kindstringThe lock kind.
namestringName of the lock.
notesstringNotes about this lock.
Parameter: lock.kind

The lock kind.

  • Required: No
  • Type: string
  • Allowed:
    [
      'CanNotDelete'
      'None'
      'ReadOnly'
    ]
Parameter: lock.name

Name of the lock.

  • Required: No
  • Type: string
Parameter: lock.notes

Notes about this lock.

  • Required: No
  • Type: string
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.

  • Required: No
  • Type: object
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: No
  • Type: array

Required parameters

ParameterTypeDescription
principalIdstringThe principal ID of the user, group, or service principal to assign the role to.
roleDefinitionIdOrNamestringThe role to assign β€” either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription).

Optional parameters

ParameterTypeDescription
principalTypestringThe 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'
    ]
Parameter: tags

Tags applied to every resource.

  • Required: No
  • Type: object
Parameter: terraformLinuxAmd64Sha256

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'
Parameter: terraformVersion

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

OutputTypeDescription
applianceAddressstringAddress clients reach the appliance on: the internal load balancer frontend in activeStandby, the host private IP in single.
applianceHostNamesarrayNames of the appliance hosts.
applianceHostResourceIdsarrayResource IDs of the appliance hosts.
applianceSubnetResourceIdstringResource ID of the appliance subnet.
applianceVmPrivateIpAddressstringStatic private IP of the appliance VM: the publishing gateway’s backend target.
applianceVmResourceIdstringResource ID of the appliance VM.
dataDiskNamestringName of the data disk that holds the Atlantis state.
keyVaultNamestringName of the appliance’s own Key Vault.
keyVaultUristringURI of the appliance’s own Key Vault.
manualStepsRequiredForReusearrayRole assignments the template could not make because the identity was reused. Empty for a new identity.
tfStateContainerNamestringBlob container holding Terraform state.
tfStateStorageAccountNamestringStorage account holding Terraform state (RBAC only, no shared keys).
virtualNetworkResourceIdstringResource ID of the appliance VNet, for peerings.
vmIdentityPrincipalIdstringPrincipal 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).

ReferenceType
br/innofactor:avm/ptn/lz/container-appliance:0.1.0Remote reference
br/public:avm/res/resources/resource-group:0.4.1Remote reference
br/public:avm/res/storage/storage-account:0.14.3Remote reference

Notes

What it deploys

A subscription-scope deployment that creates one resource group and everything inside it, in three layers:

LayerScopeContents
main.bicepSubscriptionCreates the resource group and invokes atlantis.bicep. It writes nothing outside the resource group: the hub return route is a prerequisite (see below).
atlantis.bicepResource groupEverything 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.0Resource groupThe 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.

Active/standby, images and the Terraform binary
  • 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.

FileCreates
seed/seed-vault.bicepA 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.bicepA 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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Seed Key Vault with the four secrets. Deploy seed/seed-vault.bicep, then write:

    Secret nameParameterContent
    atlantis-ado-patazureDevOpsPatThe service account’s PAT (item 6)
    atlantis-webhook-passwordazureDevOpsWebhookPasswordRandom, letters and digits only (a $ is read by Docker Compose as a variable); the service hooks present it with adoWebhookUser
    oauth2-proxy-client-secretoauth2ClientSecretThe app registration’s secret (item 4)
    oauth2-proxy-cookie-secretoauth2ProxyCookieSecretopenssl 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.

  6. 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.

  7. 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.

  8. 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).

  9. 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
  1. 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.

  2. 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.

  3. Four service hooks per repository, all posting to https://<atlantisExternalHostname>/events
    with the full message and the webhook credential:

    EventFilterPurpose
    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.

  4. 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.

  5. 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.

  6. 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.

  7. A server replacing an existing Atlantis must carry that server’s repo config in
    repoConfig; without it, approved stops being an apply requirement.

  8. 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 form
  • atlantis.bicep: the Atlantis workload layer (resource-group scope)
  • seed/: the seed vault and pipeline identity, deployed once by hand
  • tests/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
  • None

Version history

VersionPublished
0.1.02026-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.

Resource Types

Resource TypeAPI Version
Microsoft.Authorization/locks2020-05-01
Microsoft.Authorization/policyAssignments2024-04-01
Microsoft.Authorization/roleAssignments2022-04-01
Microsoft.Automanage/configurationProfileAssignments2022-05-04
Microsoft.Compute/disks2024-03-02
Microsoft.Compute/virtualMachines2024-07-01
Microsoft.Compute/virtualMachines/extensions2022-11-01
Microsoft.Compute/virtualMachineScaleSets2024-07-01
Microsoft.DevTestLab/schedules2018-09-15
Microsoft.GuestConfiguration/guestConfigurationAssignments2020-06-25
Microsoft.Insights/actionGroups2023-01-01
Microsoft.Insights/dataCollectionRuleAssociations2023-03-11
Microsoft.Insights/dataCollectionRules2023-03-11
Microsoft.Insights/diagnosticSettings2021-05-01-preview
Microsoft.Insights/metricAlerts2018-03-01
Microsoft.Insights/scheduledQueryRules2025-01-01-preview
Microsoft.Insights/workbooks2023-06-01
Microsoft.KeyVault/vaults2024-11-01
Microsoft.KeyVault/vaults/accessPolicies2024-11-01
Microsoft.KeyVault/vaults/keys2024-11-01
Microsoft.KeyVault/vaults/secrets2024-11-01
Microsoft.Maintenance/configurationAssignments2023-04-01
Microsoft.Maintenance/maintenanceConfigurations2023-04-01
Microsoft.ManagedIdentity/userAssignedIdentities2024-11-30
Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials2024-11-30
Microsoft.Network/loadBalancers2024-05-01
Microsoft.Network/natGateways2023-04-01
Microsoft.Network/networkInterfaces2024-05-01
Microsoft.Network/networkSecurityGroups2023-11-01
Microsoft.Network/privateEndpoints2023-11-01
Microsoft.Network/privateEndpoints2024-10-01
Microsoft.Network/privateEndpoints2024-05-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-05-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-11-01
Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-10-01
Microsoft.Network/publicIPAddresses2023-09-01
Microsoft.Network/publicIPAddresses2024-05-01
Microsoft.Network/publicIPPrefixes2023-09-01
Microsoft.Network/routeTables2024-05-01
Microsoft.Network/virtualNetworks2024-05-01
Microsoft.Network/virtualNetworks/subnets2024-05-01
Microsoft.Network/virtualNetworks/virtualNetworkPeerings2024-01-01
Microsoft.OperationalInsights/workspaces2025-02-01
Microsoft.OperationalInsights/workspaces/dataExports2025-02-01
Microsoft.OperationalInsights/workspaces/dataSources2025-02-01
Microsoft.OperationalInsights/workspaces/linkedServices2025-02-01
Microsoft.OperationalInsights/workspaces/linkedStorageAccounts2025-02-01
Microsoft.OperationalInsights/workspaces/savedSearches2025-02-01
Microsoft.OperationalInsights/workspaces/storageInsightConfigs2025-02-01
Microsoft.OperationalInsights/workspaces/tables2025-02-01
Microsoft.OperationsManagement/solutions2015-11-01-preview
Microsoft.PolicyInsights/remediations2021-10-01
Microsoft.RecoveryServices/vaults2024-04-01
Microsoft.RecoveryServices/vaults/backupconfig2023-01-01
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems2023-01-01
Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems2024-10-01
Microsoft.RecoveryServices/vaults/backupPolicies2024-10-01
Microsoft.RecoveryServices/vaults/backupstorageconfig2023-01-01
Microsoft.RecoveryServices/vaults/replicationAlertSettings2022-10-01
Microsoft.RecoveryServices/vaults/replicationFabrics2022-10-01
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers2022-10-01
Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings2022-10-01
Microsoft.RecoveryServices/vaults/replicationPolicies2023-06-01
Microsoft.SecurityInsights/onboardingStates2024-03-01
Microsoft.Storage/storageAccounts2025-06-01
Microsoft.Storage/storageAccounts/blobServices2025-01-01
Microsoft.Storage/storageAccounts/blobServices/containers2025-01-01
Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies2025-01-01
Microsoft.Storage/storageAccounts/fileServices2025-06-01
Microsoft.Storage/storageAccounts/fileServices/shares2025-01-01
Microsoft.Storage/storageAccounts/localUsers2025-06-01
Microsoft.Storage/storageAccounts/managementPolicies2025-06-01
Microsoft.Storage/storageAccounts/objectReplicationPolicies2025-01-01
Microsoft.Storage/storageAccounts/queueServices2025-06-01
Microsoft.Storage/storageAccounts/queueServices/queues2025-06-01
Microsoft.Storage/storageAccounts/tableServices2025-06-01
Microsoft.Storage/storageAccounts/tableServices/tables2025-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

ParameterTypeDescription
composeFileContentstringFull 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.

inboundAllowedCidrstringCIDR allowed inbound to the appliance. It is the source of every rule in inboundRules that does not name its own sourceAddressPrefix.
inboundRulesarrayThe 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.

namestringShort 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.
sshPublicKeystringSSH public key for the admin account. Password authentication is disabled.
vmSizestringVM 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

ParameterTypeDescription
existingIdentityPrincipalIdstringRequired if createNewManagedIdentity is false. Principal ID of the existing identity β€” used only for the manualStepsRequiredForReuse output; no new role is auto-granted to it.
existingIdentityResourceIdstringRequired if createNewManagedIdentity is false. Resource ID of the existing identity to attach.
vnetAddressPrefixstringRequired 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

ParameterTypeDescription
activeInstanceintactiveStandby 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.
additionalSyslogFacilitiesarrayExtra 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.
adminUsernamestringLocal admin username on the appliance VM.
alertEmailAddressesarrayEmail 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.
applianceSubnetNewBitsintPrefix 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.
automaticRepairActionstringloadBalanced 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.

  • automaticRepairGracePeriodstringloadBalanced only: how long a new or repaired host may report unhealthy before it is repaired, as an ISO 8601 duration between PT10M and PT90M.
    availabilityZoneintAvailability 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.

    composeDirectoryNamestringDirectory name (under /opt/{name}/) the compose file and env files are written to.
    containerRegistryobjectHow 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.

  • containerRestartAlertThresholdintThe container-restart alert fires when containers restart more than this many times in 15 minutes.
    createNatGatewayboolCreate 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.

    createNewManagedIdentityboolDefault 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.

    dataDirectoryNamestringDirectory 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.
    dataDiskSizeGBintSize 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.
    defaultRouteNextHopIpAddressstringNext-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.

    dnsServersarrayCustom DNS servers for the appliance VNet, e.g. a hub firewall DNS proxy. Empty uses Azure-provided DNS.
    drainCommandsarrayShell 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.
    enableBackupboolBack 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.
    enableKeyVaultPurgeProtectionboolPurge 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.
    enablePatchScheduleboolAttach the VM to the patch window above. False leaves patching to Azure, at times Azure chooses.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    envFilesarrayEnv 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 β€” no

    az CLI on the box, umask 177 before any file is created, each file chmod 600 immediately after.

    existingSubnetResourceIdstringResource 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.

    hostPrivateIpAddressstringStatic 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.
    instanceCountintNumber 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).
    itsmWebhookUristringITSM webhook URI for the action group.
    keyVaultNamestringName 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).
    keyVaultSecretsarraySecrets 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.

    locationstringLocation for all Resources.
    lockobjectA 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.
    maintenanceWindowobjectMonthly 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.

    payloadPortintTCP 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.
    postComposeCommandsarrayExtra shell commands run after docker compose up -d (e.g. a one-off payload-specific bootstrap action). Empty by default.
    preComposeCommandsarrayExtra 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.
    protectStatefulResourcesboolPut 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.

    roleAssignmentsarrayAdditional role assignments to grant on this resource group, beyond the identity grants this module manages itself via createNewManagedIdentity.
    scaleModestringHow 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.
  • scaleSetZonesarrayloadBalanced 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.
    tagsobjectTags applied to every resource this module creates.
    virtualNetworkPeeringsarrayVNet 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.

    workspaceResourceIdstringResource 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: Yes
    • Type: array

    Required parameters

    ParameterTypeDescription
    descriptionstringNSG rule description. At most 140 characters β€” ARM rejects longer ones at deploy time, not compile time, without this.
    namestringNSG rule name.
    portintDestination port to allow.
    protocolstringProtocol, e.g. Tcp.

    Optional parameters

    ParameterTypeDescription
    sourceAddressPrefixstringSource 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.

    • Required: Yes
    • Type: int
    Parameter: inboundRules.protocol

    Protocol, e.g. Tcp.

    • Required: Yes
    • Type: string
    Parameter: inboundRules.sourceAddressPrefix

    Source address prefix for this rule. Defaults to inboundAllowedCidr.

    • Required: No
    • Type: string
    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:
      [
        1
        2
      ]
    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:
      [
        1
        2
        3
      ]
    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

    ParameterTypeDescription
    modestringHow to authenticate: anonymous, managedIdentity or keyVaultToken.
    serverstringRegistry server name, for example contoso.azurecr.io. Empty with mode anonymous.

    Conditional parameters

    ParameterTypeDescription
    tokenSecretNamestringRequired if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token.

    Optional parameters

    ParameterTypeDescription
    registryResourceIdstringmanagedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.
    tokenUsernamestringkeyVaultToken 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.

    • Required: No
    • Type: string
    Parameter: containerRegistry.registryResourceId

    managedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.

    • Required: No
    • Type: string
    Parameter: containerRegistry.tokenUsername

    keyVaultToken only: the user name that goes with the token.

    • Required: No
    • Type: string
    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 β€” no

    az 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

    ParameterTypeDescription
    fileNamestringFile name, written under composeDirectoryName. Must start with .env: the bootstrap hashes .env* to detect a rotated secret.
    variablesarrayVariables 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

    ParameterTypeDescription
    secretNamestringName of the Key Vault secret (must be present in keyVaultSecrets) whose value is written as this variable.
    variableNamestringEnvironment 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

    ParameterTypeDescription
    namestringSecret name in Key Vault.
    valuesecurestringSecret value.

    Optional parameters

    ParameterTypeDescription
    contentTypestringContent 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

    ParameterTypeDescription
    kindstringThe lock kind.
    namestringName of the lock.
    notesstringNotes 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

    ParameterTypeDescription
    principalIdstringThe principal ID of the user, group, or service principal to assign the role to.
    roleDefinitionIdOrNamestringThe role to assign β€” either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription).

    Optional parameters

    ParameterTypeDescription
    principalTypestringThe 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
    Parameter: tags

    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

    OutputTypeDescription
    actionGroupResourceIdstringResource ID of the appliance action group β€” a workload module adds its own alerts to it.
    applianceAddressstringThe address callers route to: the VM itself for single, the internal load balancer frontend for activeStandby and loadBalanced.
    applianceHostNamesarrayNames of the appliance VMs, in host order. Empty for loadBalanced.
    applianceHostResourceIdsarrayResource IDs of the appliance VMs: one for single, two for activeStandby (in host order), empty for loadBalanced.
    applianceSubnetResourceIdstringResource ID of the appliance subnet β€” pass this to a workload module that needs to scope its own resources’ network ACLs to the same subnet.
    applianceVmPrivateIpAddressstringDeprecated alias for applianceAddress, kept so existing consumers compile. Use applianceAddress.
    applianceVmResourceIdstringResource ID of the first appliance VM, or of the scale set in loadBalanced mode.
    dataDiskNamestringName of the data disk. Empty when there is none.
    keyVaultNamestringName of this module’s Key Vault.
    keyVaultUristringURI of this module’s Key Vault β€” pass this to a workload module that needs to reference the same vault.
    leaseStorageAccountNamestringName of the storage account that holds the active/standby lease. Empty unless activeStandby.
    loadBalancerResourceIdstringResource ID of the internal load balancer. Empty for single.
    manualStepsRequiredForReusearrayEmpty 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.
    resourceGroupNamestringThe name of the resource group the appliance was deployed into.
    scaleSetResourceIdstringResource ID of the scale set. Empty unless loadBalanced.
    virtualNetworkResourceIdstringResource ID of the VNet this module created. Empty when existingSubnetResourceId is set.
    vmIdentityPrincipalIdstringPrincipal ID of the VM’s managed identity (new or reused) β€” a workload module grants this principal whatever additional roles its own resources need.
    vmIdentityResourceIdstringResource ID of the VM’s managed identity (new or reused).
    workspaceResourceIdstringResource 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).

    ReferenceType
    br/public:avm/res/compute/virtual-machine:0.15.0Remote reference
    br/public:avm/res/insights/action-group:0.7.0Remote reference
    br/public:avm/res/insights/data-collection-rule:0.6.1Remote reference
    br/public:avm/res/insights/metric-alert:0.4.0Remote reference
    br/public:avm/res/insights/scheduled-query-rule:0.5.1Remote reference
    br/public:avm/res/key-vault/vault:0.14.0Remote reference
    br/public:avm/res/managed-identity/user-assigned-identity:0.4.1Remote reference
    br/public:avm/res/network/nat-gateway:1.1.0Remote reference
    br/public:avm/res/network/network-security-group:0.5.1Remote reference
    br/public:avm/res/network/public-ip-address:0.6.0Remote reference
    br/public:avm/res/network/virtual-network:0.7.0Remote reference
    br/public:avm/res/operational-insights/workspace:0.12.0Remote reference
    br/public:avm/res/recovery-services/vault:0.7.0Remote reference
    br/public:avm/res/storage/storage-account:0.33.1Remote 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:

    ParameterWhat the caller supplies
    composeFileContentThe 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.
    keyVaultSecretsName, value and content type of each secret to store in this module’s Key Vault.
    envFilesEnv 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.
    inboundRulesOne NSG allow rule per published port. A deny-all-else rule is always added beneath them.
    preComposeCommands, postComposeCommandsExtra 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.
    additionalSyslogFacilitiesSyslog 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
    scaleModeHostsStateFailover
    single (default)One VM. instanceCount is 1.One data disk.Restore from backup. No load balancer; applianceAddress is the VM.
    activeStandbyTwo 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.
    loadBalancedA 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:

    1. 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.
    2. Detach the data disk (dataDiskName output) from the active host.
    3. 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.

    1. 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.
    2. 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.
    3. 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).
    4. An alert receiver. Set alertEmailAddresses and/or itsmWebhookUri. The alerts are always created, but an action group with no receiver delivers nothing.
    5. 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
    • None

    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
    • None

    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
    • None

    Version history

    VersionPublished
    0.2.12026-11-24
    0.2.02026-11-23
    0.1.12026-11-14
    0.1.02026-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.

    Resource Types

    Resource TypeAPI Version
    Microsoft.Authorization/locks2020-05-01
    Microsoft.Authorization/roleAssignments2022-04-01
    Microsoft.ContainerRegistry/registries2023-06-01-preview
    Microsoft.ContainerRegistry/registries/cacheRules2023-06-01-preview
    Microsoft.ContainerRegistry/registries/credentialSets2023-11-01-preview
    Microsoft.ContainerRegistry/registries/replications2023-06-01-preview
    Microsoft.ContainerRegistry/registries/scopeMaps2023-06-01-preview
    Microsoft.ContainerRegistry/registries/webhooks2023-06-01-preview
    Microsoft.Insights/diagnosticSettings2021-05-01-preview
    Microsoft.Network/privateEndpoints2023-11-01
    Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-11-01
    Microsoft.Resources/resourceGroups2021-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/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

    ParameterTypeDescription
    namestringName of the resource to create.

    Optional parameters

    ParameterTypeDescription
    acrSkustringThe SKU of the container registry. Geo-replication requires Premium.
    adminUserEnabledboolEnable/Disable Admin User.
    anonymousPullEnabledboolEnable/Disable Anonymous Pull, defaults of false.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    environmentstringThe environment to deploy the resources to.
    locationstringLocation for all Resources.
    publicNetworkAccessstringWhether public network access is allowed. Disabling it requires the Premium SKU.
    replicationsarrayGeo-replications of the container registry. Requires acrSku to be Premium. Each entry needs a name and a location that differs from the registry location.
    tagsobjectTags 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:
      [
        'Disabled'
        'Enabled'
      ]
    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.

    • Required: No
    • Type: array
    Parameter: tags

    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).

    ReferenceType
    br/public:avm/res/container-registry/registry:0.8.1Remote 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
    • None

    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
    • None

    0.2.5

    Changes
    • Default (#61)
    Breaking Changes
    • None

    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
    • None

    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
    • None

    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
    • None

    0.2.1

    Changes
    • 55 test placement replacement (#58)
    Breaking Changes
    • None

    0.2.0

    Changes
    • Update version.json
    Breaking Changes
    • None

    Version history

    VersionPublished
    0.3.02026-11-16
    0.2.72025-02-01
    0.2.62025-01-31
    0.2.52025-01-30
    0.2.42025-01-29
    0.2.22025-01-29
    0.2.12025-01-29
    0.2.02025-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

    • Virtual Network: Deploys a virtual network with configurable address space and subnets.
    • Subnets: Creates subnets with customizable configurations for various workload components.
    • Network Security Groups (NSGs): Attaches NSGs to subnets with pre-defined or custom security rules.
    • Route Tables: Configures route tables for subnets to control network traffic flow.
    • Azure Firewall Rules: Optionally creates firewall policy rule collection groups for network security.
    • Diagnostics: Configures diagnostic settings for network resources.
    • Network Watcher: Deploys Network Watcher resources for network monitoring and troubleshooting.
    • Flow Logs: Sets up NSG flow logs for traffic analysis and security insights.
    • VPN Gateway: Optionally deploys a VPN gateway for secure site-to-site connectivity.
    • ExpressRoute Gateway: Optionally deploys an ExpressRoute gateway for dedicated private connectivity.
    • Azure Route Server: Deploys an Azure Route Server for dynamic routing with BGP.
    • Azure Bastion: Optionally deploys Azure Bastion for secure RDP/SSH access to virtual machines.

    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 NamePurposeAddress SpaceService EndpointsRoute TableNSGPrivate Endpoint Network PoliciesPrivate Link Service Network Policies
    GatewaySubnetReserved for VPN and ExpressRoute gateways10.0.0.0/26NoneYesNoDisabledDisabled
    RouterFrontendSubnetReserved for third-party site-to-site networking10.0.0.64/26NoneYesNoDisabledDisabled
    RouterBackendSubnetReserved for third-party site-to-site networking10.0.0.192/26NoneYesNoDisabledDisabled
    RouteServerSubnetReserved for route server10.0.3.128/26NoneNoNoDisabledDisabled
    AzureFirewallSubnetReserved for Azure Firewall10.0.1.0/24Microsoft.Storage, Microsoft.Sql, Microsoft.AzureCosmosDB, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.EventHub, Microsoft.Web, Microsoft.CognitiveServicesYesNoDisabledDisabled
    AzureFirewallManagementSubnetReserved for Azure Firewall management10.0.2.0/24NoneYesNoDisabledDisabled
    AzureBastionSubnetReserved for Azure Bastion10.0.3.192/26NoneNoYesDisabledDisabled

    Route Tables

    The module creates route tables for each subnet with the following routes:

    Route Table NameRoute NameNoteAddress PrefixNext Hop IP AddressNext Hop Type
    GatewaySubnet-rt
    RouterFrontendSubnet-rt
    RouterBackendSubnet-rt
    AzureFirewallSubnet-rtEverywhereDefault route for Azure Firewall0.0.0.0/0Internet
    AzureFirewallManagementSubnet-rtEverywhereDefault route for Azure Firewall management0.0.0.0/0Internet

    Network Security Groups

    The module attaches NSGs to subnets with the following security rules:

    Rule NameDescriptionDirectionPriorityProtocolSourceDestinationAction
    AllowHttpsFromInterntToAzurebastionsubnetAllow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion SubnetInbound1000TcpInternet*Allow
    AllowHttpsFromGatewaymanagerToAzurebastionsubnetAllow control plane traffic from Azure Gateway Manager to the Azure Bastion SubnetInbound1100TcpGatewayManager*Allow
    AllowHttpsFromAzureLoadBalancerToAzurebastionsubnetAllow control plane traffic from Azure Gateway Manager to the Azure Bastion SubnetInbound1200TcpAzureLoadBalancer*Allow
    AllowBastionHostCommunicationToAzurebastionsubnetAllow control plane traffic from Azure Gateway Manager to the Azure Bastion SubnetInbound1300TcpVirtualNetworkVirtualNetworkAllow (Ports: 8080, 5701)
    DenyAllDeny all other traffic and override the default AllowVnetInBound ruleInbound4000***Deny
    AllowSshRdpFromAzurebastionsubnetToVirtualNetworkAllow RDP and SSH from Azure Bastion Subnet to the Virtual NetworkOutbound1000Tcp*VirtualNetworkAllow (Ports: 22, 3389)
    AllowHttpsFromAzurebastionsubnetToAzureCloudAllow HTTPS from Azure Bastion Subnet to Azure Cloud for diagnostics and monitoringOutbound1100Tcp*AzureCloudAllow
    AllowBastionCommunicationFromAzurebastionsubnetToVirtualNetworkAllow data plane communication between the underlying components of Azure Bastion and the Virtual NetworkOutbound1200*VirtualNetworkVirtualNetworkAllow (Ports: 8080, 5701)
    AllowGetSessionInformationFromAzurebastionsubnetToInternetAllow remote traffic via HTTPS from Azure Gateway Manager to the Azure Bastion SubnetOutbound1300**InternetAllow (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

    NameTypeRequiredDefaultDescription
    azureBastionConfigbastionConfigType (object)No{}Optional. Configuration settings for the Azure Bastion Host.
    deploymentOptionsdeploymentOptionsType (object)No{"vpnGateway": false, "expressRouteGateway": false, "azur...Optional. Will Azure Firewall be deployed or not.
    diagnosticsStoragemonitoringStorageType (object)No{}Optional. Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty.
    enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
    expressRouteGatewayConfiggatewayType (object)No{}Optional. Configuration settings for the Express Route Gateway.
    firewallConfigfirewallConfigType (object)No{}Optional. Configuration settings for the Azure Firewall.
    firewallPolicyConfigfirewallPolicyConfigType (object)No{}Optional. Configuration settings for the Azure Firewall Policy.
    instancePrefixstringNo"10.0.0.0/16"Optional. The hub & spoke address space. Defaults to 10.0.0.0/16.
    locationstringNo"[deployment().location]"Optional. Location for all resources.
    locklockType (object)NoOptional. The lock settings of the service.
    namestringNo"[replace(subscription().displayName, ' ', '-')]"Optional. Name of the Network Watcher resource (hidden).
    partnerCountrystringNo"norway"Optional. The Partner ID for partner attribution.
    roleAssignmentsroleAssignmentType (array)NoOptional. Array of role assignments to create.
    routeServerBgpPeersbgpConnectionType (array)No[]Optional. An array detailing the remote BGP peers of this Route Server.
    tagsobjectNoOptional. Tags of the resource.
    vpnGatewayConfiggatewayType (object)No{}Optional. Configuration settings for the VPN Gateway.

    Outputs

    NameTypeDescription
    azureBastionLocationstringThe location the Azure Bastion was deployed into.
    azureBastionNamestringThe name of the Azure Bastion.
    azureBastionResourceIdstringThe resource ID of the Azure Bastion.
    erGatewayActiveActiveboolShows if the virtual network gateway is configured in Active-Active mode.
    erGatewayAsnintThe ASN (Autonomous System Number) of the virtual network gateway.
    erGatewayCustomBgpIpAddressesstringThe primary custom Azure APIPA BGP IP address.
    erGatewayDefaultBgpIpAddressesstringThe primary default Azure BGP peer IP address.
    erGatewayIdstringThe resource ID of the virtual network gateway.
    erGatewayIpConfigurationsarrayThe IPconfigurations object of the Virtual Network Gateway.
    erGatewayLocationstringThe location the resource was deployed into.
    erGatewayNamestringThe name of the virtual network gateway.
    erGatewayPrimaryPublicIpAddressstringThe primary public IP address of the virtual network gateway.
    erGatewaySecondaryCustomBgpIpAddressstringThe secondary custom Azure APIPA BGP IP address (Active-Active mode).
    erGatewaySecondaryDefaultBgpAddressstringThe secondary default Azure BGP peer IP address (Active-Active mode).
    erGatewaySecondaryPublicIpAddressstringThe secondary public IP address of the virtual network gateway (Active-Active mode).
    networkResourceGroupResourceIdstringThe resource ID of the deployed virtual network.
    networkWatcherLocationstringThe location the resource was deployed into.
    networkWatcherResourceGroupIdstringThe resource group ID of the deployed network watcher.
    networkWatcherResourceGroupNamestringThe resource group the network watcher was deployed into.
    networkWatcherResourceIdstringThe resource ID of the deployed network watcher.
    networkWatchernamestringThe name of the deployed network watcher.
    nsgNamesarrayThe name of the route table.
    nsgNamesListarrayThe names of all Routes provided.
    nsgResourceIdsarrayThe resource ID of the route table.
    routeNamesListarrayThe names of all Routes provided.
    routeTableNamesarrayThe name of the route table.
    routeTableResourceIdsarrayThe resource ID of the route table.
    subnetNamesarrayThe names of the deployed subnets.
    subnetResourceIdsarrayThe resource IDs of the deployed subnets.
    virtualNetworkNamestringThe name of the virtual network.
    virtualNetworkResourceIdstringThe resource IDs of the deployed virtual network.
    vpnGatewayActiveActiveboolShows if the virtual network gateway is configured in Active-Active mode.
    vpnGatewayAsnintThe ASN (Autonomous System Number) of the virtual network gateway.
    vpnGatewayCustomBgpIpAddressesstringThe primary custom Azure APIPA BGP IP address.
    vpnGatewayDefaultBgpIpAddressesstringThe primary default Azure BGP peer IP address.
    vpnGatewayIdstringThe resource ID of the virtual network gateway.
    vpnGatewayIpConfigurationsarrayThe IPconfigurations object of the Virtual Network Gateway.
    vpnGatewayLocationstringThe location the resource was deployed into.
    vpnGatewayNamestringThe name of the virtual network gateway.
    vpnGatewayPrimaryPublicIpAddressstringThe primary public IP address of the virtual network gateway.
    vpnGatewaySecondaryCustomBgpIpAddressstringThe secondary custom Azure APIPA BGP IP address (Active-Active mode).
    vpnGatewaySecondaryDefaultBgpAddressstringThe secondary default Azure BGP peer IP address (Active-Active mode).
    vpnGatewaySecondaryPublicIpAddressstringThe 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

    VersionPublished
    0.1.52025-06-23
    0.1.42025-06-16
    0.1.32025-06-10
    0.1.22025-06-09
    0.1.12025-06-05
    0.1.02025-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.

    Resource Types

    Resource TypeAPI Version
    Microsoft.Authorization/locks2020-05-01
    Microsoft.Authorization/policyAssignments2024-04-01
    Microsoft.Authorization/roleAssignments2022-04-01
    Microsoft.Automanage/configurationProfileAssignments2022-05-04
    Microsoft.Compute/disks2024-03-02
    Microsoft.Compute/virtualMachines2024-07-01
    Microsoft.Compute/virtualMachines/extensions2022-11-01
    Microsoft.Compute/virtualMachineScaleSets2024-07-01
    Microsoft.DevTestLab/schedules2018-09-15
    Microsoft.GuestConfiguration/guestConfigurationAssignments2020-06-25
    Microsoft.Insights/actionGroups2023-01-01
    Microsoft.Insights/dataCollectionRuleAssociations2023-03-11
    Microsoft.Insights/dataCollectionRules2023-03-11
    Microsoft.Insights/diagnosticSettings2021-05-01-preview
    Microsoft.Insights/metricAlerts2018-03-01
    Microsoft.Insights/scheduledQueryRules2025-01-01-preview
    Microsoft.Insights/workbooks2023-06-01
    Microsoft.KeyVault/vaults2024-11-01
    Microsoft.KeyVault/vaults/accessPolicies2024-11-01
    Microsoft.KeyVault/vaults/keys2024-11-01
    Microsoft.KeyVault/vaults/secrets2024-11-01
    Microsoft.Maintenance/configurationAssignments2023-04-01
    Microsoft.Maintenance/maintenanceConfigurations2023-04-01
    Microsoft.ManagedIdentity/userAssignedIdentities2024-11-30
    Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials2024-11-30
    Microsoft.Network/loadBalancers2024-05-01
    Microsoft.Network/natGateways2023-04-01
    Microsoft.Network/networkInterfaces2024-05-01
    Microsoft.Network/networkSecurityGroups2023-11-01
    Microsoft.Network/privateEndpoints2024-10-01
    Microsoft.Network/privateEndpoints2023-11-01
    Microsoft.Network/privateEndpoints2024-05-01
    Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-10-01
    Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-05-01
    Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-11-01
    Microsoft.Network/publicIPAddresses2023-09-01
    Microsoft.Network/publicIPAddresses2024-05-01
    Microsoft.Network/publicIPPrefixes2023-09-01
    Microsoft.Network/routeTables2024-05-01
    Microsoft.Network/virtualNetworks2024-05-01
    Microsoft.Network/virtualNetworks/subnets2024-05-01
    Microsoft.Network/virtualNetworks/virtualNetworkPeerings2024-01-01
    Microsoft.OperationalInsights/workspaces2025-02-01
    Microsoft.OperationalInsights/workspaces/dataExports2025-02-01
    Microsoft.OperationalInsights/workspaces/dataSources2025-02-01
    Microsoft.OperationalInsights/workspaces/linkedServices2025-02-01
    Microsoft.OperationalInsights/workspaces/linkedStorageAccounts2025-02-01
    Microsoft.OperationalInsights/workspaces/savedSearches2025-02-01
    Microsoft.OperationalInsights/workspaces/storageInsightConfigs2025-02-01
    Microsoft.OperationalInsights/workspaces/tables2025-02-01
    Microsoft.OperationsManagement/solutions2015-11-01-preview
    Microsoft.PolicyInsights/remediations2021-10-01
    Microsoft.RecoveryServices/vaults2024-04-01
    Microsoft.RecoveryServices/vaults/backupconfig2023-01-01
    Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems2024-10-01
    Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems2023-01-01
    Microsoft.RecoveryServices/vaults/backupPolicies2024-10-01
    Microsoft.RecoveryServices/vaults/backupstorageconfig2023-01-01
    Microsoft.RecoveryServices/vaults/replicationAlertSettings2022-10-01
    Microsoft.RecoveryServices/vaults/replicationFabrics2022-10-01
    Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers2022-10-01
    Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectionContainerMappings2022-10-01
    Microsoft.RecoveryServices/vaults/replicationPolicies2023-06-01
    Microsoft.Resources/resourceGroups2021-04-01
    Microsoft.SecurityInsights/onboardingStates2024-03-01
    Microsoft.Storage/storageAccounts2025-06-01
    Microsoft.Storage/storageAccounts/blobServices2025-01-01
    Microsoft.Storage/storageAccounts/blobServices/containers2025-01-01
    Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies2025-01-01
    Microsoft.Storage/storageAccounts/fileServices2025-06-01
    Microsoft.Storage/storageAccounts/fileServices/shares2025-01-01
    Microsoft.Storage/storageAccounts/localUsers2025-06-01
    Microsoft.Storage/storageAccounts/managementPolicies2025-06-01
    Microsoft.Storage/storageAccounts/objectReplicationPolicies2025-01-01
    Microsoft.Storage/storageAccounts/queueServices2025-06-01
    Microsoft.Storage/storageAccounts/queueServices/queues2025-06-01
    Microsoft.Storage/storageAccounts/tableServices2025-06-01
    Microsoft.Storage/storageAccounts/tableServices/tables2025-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

    ParameterTypeDescription
    graphClientIdstringClient (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.
    graphClientSecretsecurestringClient 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.
    graphSenderMailboxstringThe 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).
    graphTenantIdstringEntra tenant ID of the app registration that sends the mail.
    inboundAllowedCidrstringCIDR allowed inbound to the relay on port 25: the subnet the hub firewall forwards from. This module opens nothing else.
    mailDomainstringThe mail domain: Postfix mydomain and myorigin, for example contoso.com.
    myNetworksarrayNetworks 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.
    relayHostnamestringThe name the relay announces: Postfix myhostname and the SMTP banner, for example smtp.contoso.com.
    senderAllowListarraySender 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.
    sshPublicKeystringSSH public key for the admin account. Password sign-in is disabled.

    Conditional parameters

    ParameterTypeDescription
    existingIdentityPrincipalIdstringRequired if createNewManagedIdentity is false. Principal ID of the existing identity.
    existingIdentityResourceIdstringRequired if createNewManagedIdentity is false. Resource ID of the existing identity.
    registryTokensecurestringRequired 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.
    vnetAddressPrefixstringRequired if existingSubnetResourceId is empty. Address space for the relay’s own VNet, for example 10.20.0.0/24.

    Optional parameters

    ParameterTypeDescription
    adminUsernamestringLocal admin username on the hosts.
    alertEmailAddressesarrayEmail addresses added to the action group. A service desk mailbox turns each alert into a ticket.
    applianceSubnetNewBitsintPrefix 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.
    availabilityZoneintAvailability zone for the hosts that are not spread by scaleSetZones.
    businessHoursEndUtcintBusiness hours end at the start of this hour, UTC, 1 to 24. Weekdays only.
    businessHoursStartUtcintFirst business hour, UTC, 0 to 23.
    containerRegistryobjectHow 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.
    containerRestartAlertThresholdintThe container-restart alert fires when the relay container restarts more than this many times in 15 minutes.
    createNatGatewayboolCreate and associate a NAT Gateway for outbound egress. Ignored with existingSubnetResourceId.
    createNewManagedIdentityboolCreate a new user-assigned identity (true) or attach an existing one (false).
    defaultRouteNextHopIpAddressstringNext-hop IP for a 0.0.0.0/0 route on the relay subnet, for example the hub firewall. Ignored with existingSubnetResourceId.
    dnsServersarrayCustom DNS servers for the relay VNet. Ignored with existingSubnetResourceId.
    drainTimeoutSecondsintSeconds 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.
    enableKeyVaultPurgeProtectionboolPurge protection on the Key Vault. Default true; turn off only for throwaway deployments.
    enableNoDeliveryAlertboolAlert when no mail was delivered for an hour inside business hours. Turn it off for a relay that legitimately carries no weekday traffic.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    existingSubnetResourceIdstringResource 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.
    graphFailureAlertThresholdintThe graph-send-failures alert fires when the relay logs more than this many deferred or rejected Graph sends in 15 minutes.
    hostPrivateIpAddressstringStatic private IP for the first host. Empty uses the container-appliance default.
    imageReferencestringThe 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).
    instanceCountintNumber of relay hosts, all active together behind the internal load balancer. Every host takes an address in the subnet.
    itsmWebhookUristringITSM webhook URI for the action group.
    keyVaultNamestringName of the appliance Key Vault. Empty derives it from the name.
    locationstringAzure region to deploy the resources.
    lockobjectA 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.
    messageSizeLimitBytesintLargest message the relay accepts, in bytes. Graph rejects a message above its own limit, so keep this at or below it.
    namestringShort name used to derive every resource name. Lowercase alphanumeric and hyphens, kept short.
    protectStatefulResourcesboolCanNotDelete locks on each resource that holds state, instead of on the resource group. See the container-appliance module.
    queuedMailAlertThresholdintThe queued-mail alert fires when a host has held more than this many messages for the whole 15-minute window.
    relayHoststringNext hop Postfix names as relayhost. Mail is delivered through Graph, so this rarely matters.
    relayHostPortintPort of relayHost.
    resourceGroupNamestringName of the resource group this module creates. Defaults to name.
    roleAssignmentsarrayAdditional role assignments to grant on this resource group.
    scaleSetZonesarrayAvailability zones the scale set spreads across, for example [1, 2, 3]. Empty uses availabilityZone alone.
    tagsobjectTags applied to every resource.
    timeZonestringContainer time zone, for example Europe/Dublin.
    virtualNetworkPeeringsarrayVNet peerings in the AVM shape. A remote side is a write outside the relay resource group. Ignored with existingSubnetResourceId.
    vmSizestringVM size. Avoid burstable (B-series) sizes.
    workspaceResourceIdstringResource 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.

    • Required: Yes
    • Type: array
    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.

    • Required: Yes
    • Type: array
    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:
      [
        1
        2
        3
      ]
    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
    Parameter: businessHoursStartUtc

    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

    ParameterTypeDescription
    modestringHow to authenticate: anonymous, managedIdentity or keyVaultToken.
    serverstringRegistry server name, for example contoso.azurecr.io. Empty with mode anonymous.

    Conditional parameters

    ParameterTypeDescription
    tokenSecretNamestringRequired if mode is keyVaultToken: name of the Key Vault secret (one of keyVaultSecrets) holding the registry token.

    Optional parameters

    ParameterTypeDescription
    registryResourceIdstringmanagedIdentity only: resource ID of the Azure Container Registry, to grant the VM identity AcrPull on it.
    tokenUsernamestringkeyVaultToken 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

    ParameterTypeDescription
    kindstringThe lock kind.
    namestringName of the lock.
    notesstringNotes 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

    ParameterTypeDescription
    principalIdstringThe principal ID of the user, group, or service principal to assign the role to.
    roleDefinitionIdOrNamestringThe role to assign β€” either a full role definition resource ID, or a bare role definition GUID (resolved against this subscription).

    Optional parameters

    ParameterTypeDescription
    principalTypestringThe 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
    Parameter: tags

    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

    OutputTypeDescription
    actionGroupResourceIdstringResource ID of the action group the alerts notify.
    applianceAddressstringAddress of the internal load balancer. Point the hub firewall DNAT and the internal relay name here.
    applianceSubnetResourceIdstringResource ID of the relay subnet.
    keyVaultNamestringName of the appliance Key Vault.
    keyVaultUristringURI of the appliance Key Vault.
    loadBalancerResourceIdstringResource ID of the internal load balancer.
    manualStepsRequiredForReusearrayRole assignments the template could not make because an existing identity was reused. Empty for a new identity.
    resourceGroupNamestringName of the resource group.
    scaleSetResourceIdstringResource ID of the scale set that holds the relay hosts.
    virtualNetworkResourceIdstringResource ID of the relay VNet. Empty when an existing subnet was used.
    vmIdentityPrincipalIdstringPrincipal ID of the identity the hosts run as.
    workspaceResourceIdstringResource 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).

    ReferenceType
    br/innofactor:avm/ptn/lz/container-appliance:0.2.1Remote reference
    br/public:avm/res/insights/scheduled-query-rule:0.5.1Remote 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
    1. 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.
    2. 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.
        1. 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.
        2. New-ApplicationAccessPolicy -AppId <app> -PolicyScopeGroupId <sender-mailbox> -AccessRight RestrictAccess.
        3. 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.
        4. 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.
    3. A read-only registry token (registryToken, read:packages) for the private relay image package, issued to a service identity and never to a person.
    4. 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.
    5. 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).

    AlertFires whenSeverity
    Relay Queue Backloga host’s smallest queue depth over 15 minutes is above queuedMailAlertThreshold2
    Relay Graph Send Failuresmore than graphFailureAlertThreshold deferred or rejected Graph sends in 15 minutes1
    Relay No Deliveriesno delivery for an hour, hosts reporting, weekdays inside businessHoursStartUtc to businessHoursEndUtc (UTC); switch off with enableNoDeliveryAlert3
    Container Restartingthe 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
    • None

    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
    • None

    Version history

    VersionPublished
    0.2.02026-11-24
    0.1.12026-11-20
    0.1.02026-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

    • Microsoft Defender for Cloud (Optional): Enables security monitoring with configurable settings.
    • Partner Attribution: Supports telemetry for partner solutions.
      • Partner Attribution Link
    • Budget & Cost Alerts (Optional): Configures budget monitoring and email-based cost alerts.
    • Resource Provider Registration (Optional): Registers required resource providers based on provided input.
    • Management Group Placement (Optional): Assigns the subscription to a specified management group.
    • Role-Based Access Control (RBAC) Assignments (Optional): Assigns predefined roles to users or groups.
    • Diagnostic Settings: Configures monitoring and logging settings.
    • Identity & Access Management: Automates Entra ID group creation for role assignments.
    • PIM: Enable Privileged Identity Management for role assignments.

    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

    NameTypeRequiredDefaultDescription
    budgetbudgetType (object)No{}Optional. A budget & alert configuration for the subscription. Default = null.
    defenderAgentlessVmScanningExclusionTagsstringNo"[[{}]"Conditional. Required if enableAgentlessVmScanning = True. Provide a JSON array of Key Value Pairs defining exceptions for Agentless VM Scanning.
    defenderApiSubPlanstringNo"P1"Optional. The sub plan value for API. This can be empty, P1, P2, P3, P4, or P5.
    defenderApiTierstringNo"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.
    defenderAppServicesPricingTierstringNo"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.
    defenderArmPricingTierstringNo"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.
    defenderCapGBPerMonthPerStorageAccountstringNo"5000"Optional. The monthly cap for malware scanning per storage account - -1 for infinite or at least 10.
    defenderContainersTierstringNo"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.
    defenderCosmosDbsTierstringNo"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.
    defenderCspmPricingTierstringNo"Free"Optional. The pricing tier value for Defender CSPM. - Free or Standard.
    defenderDeviceSecurityGroupPropertiesobjectNo{}Optional. Device Security group data.
    defenderEnableAgentlessDiscoveryForKubernetesstringNo"True"Optional. Enable zero footprint, API-based discovery of Kubernetes clusters - True or False.
    defenderEnableAgentlessVmScanningstringNo"False"Optional. Enable Agentless VM Scanning for VMs. This can be True or False.
    defenderEnableContainerRegistriesVulnerabilityAssessmentsstringNo"True"Optional. Enable vulnerability management for images stored in your container registries - True or False.
    defenderEnableContainerSensorstringNo"True"Optional. Enable rich threat detection suite for Kubernetes clusters, nodes, and workloads - True or False.
    defenderEnableEntraPermissionsManagementstringNo"False"Optional. Enable CIEM capabilities that helps organizations to manage and control user access and entitlements. This can be True or False.
    defenderEnableFileIntegrityMonitoringstringNo"False"Optional. Enable File Integrity Monitoring for VMs. This can be True or False.
    defenderEnableMdeDesignatedSubscriptionstringNo"True"Optional. Enable MdeDesignatedSubscription for VMs. This can be True or False.
    defenderEnableOnUploadMalwareScanningstringNo"True"Optional. Enable scanning of uploads to Storage Accounts - True or False.
    defenderEnableSensitiveDataDiscoverystringNo"True"Optional. Enable scanning for sensitive data uploaded to Storage Accounts - True or False.
    defenderFileIntegrityMonitoringRulesstringNo"[[{'RuleId':'<guid>','MonitoredEntities':{'WindowsFiles'...Conditional. Required if enableFileIntegrityMonitoring = True. Provide a JSON array of Key Value Pairs defining rules for File Integrity Monitoring.
    defenderIoTSecuritySolutionPropertiesobjectNo{}Optional. Security Solution data.
    defenderKeyVaultsPricingTierstringNo"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.
    defenderNotificationEmailstringNo""Optional. Notification e-mail addresses: - comma separated string.
    defenderNotificationPhonestringNo""Optional. Notification phone number.
    defenderNotificationSourcesMinimalRiskLevelstringNo"Medium"Optional. Enable notifications or not: - True or False.
    defenderNotificationsRolesarrayNo["Owner", "Contributor"]Optional. Which built-in roles should be notified in the event of an issue. Can include Owner, Controbutor, ServiceAdmin, or AccountAdmin.
    defenderNotificationsSourcesMinimalSeveritystringNo"Medium"Optional. The threshold for security alerts: - High, Medium, or Low.
    defenderOpenSourceRelationalDatabasesTierstringNo"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.
    defenderScopestringNo"[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.
    defenderSqlServerVirtualMachinesPricingTierstringNo"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.
    defenderSqlServersPricingTierstringNo"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.
    defenderStorageAccountsPricingTierstringNo"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.
    defenderVirtualMachinesPricingTierstringNo"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.
    defenderVirtualMachinesSubPlanstringNo"P1"Optional. The sub plan value for VMs. This can be empty, P1 or P2.
    defenderWorkspaceResourceIdstringNo""Optional. The full resource Id of the Log Analytics workspace to save the data in.
    enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
    locationstringNo"[deployment().location]"Optional. Location for all Resources.
    namestringNo""Optional. Name of the pattern to create. Default is lowercase subscription.displayName.
    partnerCountrystringNo"norway"Optional. The Partner ID for partner attribution. Default = Norway.
    resourceProvidersListarrayNo["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.
    tagsobjectNo{}Optional. Tags of the resource.

    Outputs

    NameTypeDescription
    provisioningRgLocationstringThe location where the provisioning resources were deployed.
    provisioningRgNamestringThe Resource Group name that was created for provisioning resources.
    registeredResourceProvidersarrayAn 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

    VersionPublished
    0.1.122025-04-16
    0.1.112025-04-01
    0.1.102025-03-31
    0.1.92025-03-16
    0.1.82025-03-01
    0.1.72025-02-25
    0.1.62025-02-16
    0.1.52025-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.

    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

    ParameterTypeDescription
    enableTelemetryboolEnable/Disable usage telemetry for module.
    locationstringLocation for all Resources.
    partnerCountrystringThe 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).

    ReferenceType
    br/innofactor:avm/ptn/management/partnerRemote reference
    br/public:avm/res/resources/resource-group:0.4.1Remote 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
    • None

    0.1.0

    Changes
    • Adding initial spoke configuration with sub patterns (#89)
    Breaking Changes
    • None

    Version history

    VersionPublished
    0.1.12026-11-16
    0.1.02025-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.

    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 TypeAPI Version
    Microsoft.Authorization/locks2020-05-01
    Microsoft.Authorization/roleAssignments2022-04-01
    Microsoft.ManagedIdentity/userAssignedIdentities2023-01-31
    Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials2023-01-31
    Microsoft.Resources/deploymentScripts2023-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

    ParameterTypeDescription
    managedIdentitiesobjectThe managed identity definition for this resource. Required if assignRbacRole is true and managedIdentityName is null.
    managedIdentityNamestringName of the Managed Identity resource to create. Required if assignRbacRole is true and managedIdentities is null. Defaults to id-ContainerRegistryImport.

    Optional parameters

    ParameterTypeDescription
    assignRbacRoleboolIf 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.
    cleanupPreferencestringWhen the script resource is cleaned up. Default is OnExpiration and the cleanup time is after 1h.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    locationstringLocation for all Resources.
    resourceProvidersListarrayAn object of resource providers and resource providers features to register. If left blank/empty, no resource providers will be registered.
    runOnceboolHow the deployment script should be forced to execute. Default is to force the script to deploy the image to run every time.
    tagsobjectTags of the resource.
    Parameter: managedIdentities

    The managed identity definition for this resource. Required if assignRbacRole is true and managedIdentityName is null.

    • Required: No
    • Type: object

    Optional parameters

    ParameterTypeDescription
    userAssignedResourceIdsarrayThe 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.

    • Required: No
    • Type: array
    Parameter: managedIdentityName

    Name of the Managed Identity resource to create. Required if assignRbacRole is true and managedIdentities is null. Defaults to id-ContainerRegistryImport.

    • Required: No
    • Type: string
    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
    Parameter: tags

    Tags of the resource.

    • Required: No
    • Type: object
    • Default: {}
    • Example:
      {
          "key1": "value1"
          "key2": "value2"
      }

    Outputs

    OutputTypeDescription
    deploymentScriptLogsarrayOutput logs for the registration status.
    deploymentScriptOutputobjectOutput Object for the registration status.
    resourceGroupNamestringOutput 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).

    ReferenceType
    br/innofactor:avm/ptn/management/register-providersRemote reference
    br/public:avm/res/managed-identity/user-assigned-identity:0.4.0Remote reference
    br/public:avm/res/resources/deployment-script:0.5.0Remote reference
    br/public:avm/res/resources/resource-group:0.4.1Remote reference
    br/public:avm/utl/types/avm-common-types:0.2.1Remote 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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    0.1.3

    Changes
    • Dependency on Subscription Placement blocking publish (#116)
    Breaking Changes
    • None

    0.1.2

    Changes
    • Name default value calculation (#113)
    • Subscription configuration resource and budgets (#110)
    Breaking Changes
    • None

    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
    • None

    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
    • None

    Version history

    VersionPublished
    0.1.122026-11-16
    0.1.112025-05-16
    0.1.102025-05-01
    0.1.92025-04-16
    0.1.82025-04-01
    0.1.72025-03-31
    0.1.62025-03-16
    0.1.52025-03-01
    0.1.42025-02-16
    0.1.32025-02-12
    0.1.22025-02-12
    0.1.12025-02-01
    0.1.02025-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.

    Features Implemented

    • Subscription Assignment: Places one or more subscriptions into designated management groups.
    • Multi-Management Group Support: Supports assigning subscriptions across multiple management groups in a single deployment.

    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 TypeAPI Version
    Microsoft.Management/managementGroups/subscriptions2021-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

    ParameterTypeDescription
    subscriptionPlacementsarrayThe management group IDs along with the subscriptions to be placed underneath them.

    Optional parameters

    ParameterTypeDescription
    enableTelemetryboolEnable/Disable usage telemetry for module.
    locationstringLocation for all Resources.
    Parameter: subscriptionPlacements

    The management group IDs along with the subscriptions to be placed underneath them.

    • Required: Yes
    • Type: array

    Required parameters

    ParameterTypeDescription
    managementGroupIdstringThe unique identifier of the target management group where subscriptions are to be placed.
    subscriptionIdsarrayA 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.

    • Required: Yes
    • Type: array
    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

    OutputTypeDescription
    subscriptionPlacementSummarystringOutput 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).

    ReferenceType
    br/innofactor:avm/ptn/lz/subscription-placementRemote 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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    0.1.0

    Changes
    • Updates to Subscription Placement (#118)
    Breaking Changes
    • None

    Version history

    VersionPublished
    0.1.92026-11-16
    0.1.82025-05-16
    0.1.72025-05-01
    0.1.62025-04-16
    0.1.52025-04-01
    0.1.42025-03-31
    0.1.32025-03-16
    0.1.22025-03-01
    0.1.12025-02-16
    0.1.02025-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

    • Virtual Network: Deploys a virtual network with configurable address space and subnets.
    • Subnets: Creates subnets with customizable configurations for various workload components.
    • Network Security Groups (NSGs): Attaches NSGs to subnets with pre-defined or custom security rules.
    • Route Tables: Configures route tables for subnets to control network traffic flow.
    • Peering: Establishes virtual network peering with a hub network for centralized connectivity.
    • Azure Firewall Rules: Optionally creates firewall policy rule collection groups for network security.
    • Diagnostics: Configures diagnostic settings for network resources.
    • Network Watcher: Deploys Network Watcher resources for network monitoring and troubleshooting.
    • Flow Logs: Sets up NSG flow logs for traffic analysis and security insights.

    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

    NameTypeRequiredDefaultDescription
    addressPrefixesarrayYesRequired. An Array of 1 or more IP Address Prefixes for the Virtual Network.
    azureFirewallRulesCollectionGroupobjectNo{}Optional. Create an Azure Firewall Policy Rules Collection Group.
    connectionMonitorsarrayNo[]Optional. Array that contains the Connection Monitors.
    ddosProtectionPlanResourceIdstringNoOptional. 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.
    diagnosticsStoragemonitoringStorageType (object)No{}Optional. Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty.
    disableBgpRoutePropagationboolNofalseOptional. Switch to disable BGP route propagation.
    dnsServersarrayNoOptional. DNS Servers associated to the Virtual Network.
    enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
    enableVmProtectionboolNoOptional. Indicates if VM protection is enabled for all the subnets in the virtual network.
    flowLogsarrayNo[]Optional. Array that contains the Flow Logs.
    flowTimeoutInMinutesintNo0Optional. 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.
    hubRoutesrouteConfigArrayType (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.
    locationstringNo"[deployment().location]"Optional. Location for all resources.
    locklockType (object)NoOptional. The lock settings of the service.
    namestringNo"[format('NetworkWatcher_{0}', parameters('location'))]"Optional. Name of the Network Watcher resource (hidden).
    networkSecurityGroupsnsgConfigArrayType (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.
    partnerCountrystringNo"norway"Optional. The Partner ID for partner attribution.
    peeringsarrayNoOptional. Virtual Network Peering configurations.
    roleAssignmentsroleAssignmentType (array)NoOptional. Array of role assignments to create.
    routesrouteConfigArrayType (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.
    subnetsarrayNoOptional. An Array of subnets to deploy to the Virtual Network.
    tagsobjectNoOptional. Tags of the resource.
    vnetEncryptionboolNofalseOptional. 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.
    vnetEncryptionEnforcementstringNo"AllowUnencrypted"Optional. If the encrypted VNet allows VM that does not support encryption. Can only be used when vnetEncryption is enabled.

    Outputs

    NameTypeDescription
    networkResourceGroupResourceIdstringThe resource ID of the deployed virtual network.
    networkWatcherLocationstringThe location the resource was deployed into.
    networkWatcherResourceGroupIdstringThe resource group ID of the deployed network watcher.
    networkWatcherResourceGroupNamestringThe resource group the network watcher was deployed into.
    networkWatcherResourceIdstringThe resource ID of the deployed network watcher.
    networkWatchernamestringThe name of the deployed network watcher.
    nsgNamesarrayThe name of the route table.
    nsgNamesListarrayThe names of all Routes provided.
    nsgResourceIdsarrayThe resource ID of the route table.
    routeNamesListarrayThe names of all Routes provided.
    routeTableNamesarrayThe name of the route table.
    routeTableResourceIdsarrayThe resource ID of the route table.
    subnetNamesarrayThe names of the deployed subnets.
    subnetResourceIdsarrayThe resource IDs of the deployed subnets.
    virtualNetworkNamestringThe name of the virtual network.
    virtualNetworkResourceIdsstringThe resource IDs of the deployed virtual network.

    Changelog

    No changelog has been published for this module yet. See the version history below.

    Version history

    VersionPublished
    0.4.02025-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.

    Features Implemented

    • Virtual Network: Deploys a virtual network with configurable address space and subnets.
    • Subnets: Creates subnets with customizable configurations for various workload components.
    • Network Security Groups (NSGs): Attaches NSGs to subnets with pre-defined or custom security rules.
    • Route Tables: Configures route tables for subnets to control network traffic flow.
    • Peering: Establishes virtual network peering with a hub network for centralized connectivity.
    • Azure Firewall Rules: Optionally creates firewall policy rule collection groups for network security.
    • Diagnostics: Configures diagnostic settings for network resources.
    • Network Watcher: Deploys Network Watcher resources for network monitoring and troubleshooting.
    • Flow Logs: Sets up NSG flow logs for traffic analysis and security insights.

    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 TypeAPI Version
    Microsoft.Authorization/locks2020-05-01
    Microsoft.Authorization/roleAssignments2022-04-01
    Microsoft.Insights/diagnosticSettings2021-05-01-preview
    Microsoft.KeyVault/vaults/secrets2023-07-01
    Microsoft.Network/firewallPolicies/ruleCollectionGroups2024-05-01
    Microsoft.Network/networkSecurityGroups2023-11-01
    Microsoft.Network/networkWatchers2024-05-01
    Microsoft.Network/networkWatchers/connectionMonitors2024-05-01
    Microsoft.Network/networkWatchers/flowLogs2024-05-01
    Microsoft.Network/privateEndpoints2024-05-01
    Microsoft.Network/privateEndpoints/privateDnsZoneGroups2024-05-01
    Microsoft.Network/routeTables2023-04-01
    Microsoft.Network/routeTables/routes2024-05-01
    Microsoft.Network/virtualNetworks2024-05-01
    Microsoft.Network/virtualNetworks/subnets2024-05-01
    Microsoft.Network/virtualNetworks/virtualNetworkPeerings2024-01-01
    Microsoft.Resources/resourceGroups2025-03-01
    Microsoft.Storage/storageAccounts2024-01-01
    Microsoft.Storage/storageAccounts/blobServices2024-01-01
    Microsoft.Storage/storageAccounts/blobServices/containers2024-01-01
    Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies2024-01-01
    Microsoft.Storage/storageAccounts/fileServices2024-01-01
    Microsoft.Storage/storageAccounts/fileServices/shares2024-01-01
    Microsoft.Storage/storageAccounts/localUsers2024-01-01
    Microsoft.Storage/storageAccounts/managementPolicies2024-01-01
    Microsoft.Storage/storageAccounts/queueServices2024-01-01
    Microsoft.Storage/storageAccounts/queueServices/queues2024-01-01
    Microsoft.Storage/storageAccounts/tableServices2024-01-01
    Microsoft.Storage/storageAccounts/tableServices/tables2024-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 NameAddress SpaceService EndpointsRoute TableNSGPrivate Endpoint Network PoliciesPrivate Link Service Network Policies
    subnet110.0.10.0/26NoneYesYesDisabledDisabled
    subnet210.0.10.64/26NoneYesYesDisabledDisabled

    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 NameRule NameDescriptionAccessDirectionPriorityProtocolSource Port RangeSource Address PrefixDestination Port RangeDestination Address Prefix
    subnet1AllowLoadBalancerHealthInboundAllow inbound Azure Load Balancer health check.AllowInbound100**AzureLoadBalancer**
    subnet1DenyAllInboundDefault rule to deny all inbound trafficDenyInbound4000*****
    subnet1DenyTraversalOutboundDeny outbound double hop traversal.DenyOutbound200Tcp*VirtualNetwork3389, 22*
    subnet2AllowLoadBalancerHealthInboundAllow inbound Azure Load Balancer health check.AllowInbound100**AzureLoadBalancer**
    subnet2DenyAllInboundDefault rule to deny all inbound trafficDenyInbound4000*****
    subnet2DenyTraversalOutboundDeny outbound double hop traversal.DenyOutbound200Tcp*VirtualNetwork3389, 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

    ParameterTypeDescription
    addressPrefixesarrayAn Array of 1 or more IP Address Prefixes for the Virtual Network.

    Conditional parameters

    ParameterTypeDescription
    hubReturnRouteNextHopIpAddressstringThe private IP address of the hub firewall that the return routes point at. Required if hubReturnRoutes is not empty.

    Optional parameters

    ParameterTypeDescription
    azureFirewallRulesCollectionGroupobjectCreate an Azure Firewall Policy Rules Collection Group.
    connectionMonitorsarrayArray that contains the Connection Monitors.
    ddosProtectionPlanResourceIdstringResource 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.
    diagnosticsStorageobjectResource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty.
    dnsServersarrayDNS Servers associated to the Virtual Network.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    enableVmProtectionboolIndicates if VM protection is enabled for all the subnets in the virtual network.
    flowLogsarrayArray that contains the Flow Logs.
    flowTimeoutInMinutesintThe 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.
    hubReturnRoutesarrayHub 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.
    hubRoutesarrayAn 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.
    locationstringLocation for all resources.
    lockobjectThe lock settings of the service.
    namestringName of the Network Watcher resource (hidden).
    networkSecurityGroupsarrayAn 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.
    networkWatcherStorageAccountNameParamstringName of the storage account for Network Watcher logs. If not provided, a name will be generated.
    partnerCountrystringThe Partner ID for partner attribution.
    peeringsarrayVirtual Network Peering configurations.
    roleAssignmentsarrayArray of role assignments to create.
    routesarrayAn 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.
    subnetsarrayAn Array of subnets to deploy to the Virtual Network.
    tagsobjectTags of the resource.
    useLegacyNetworkWatcherDeploymentboolControls 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).
    vnetEncryptionboolIndicates 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.
    vnetEncryptionEnforcementstringIf 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.

    • Required: Yes
    • Type: array
    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.

    • Required: No
    • Type: string
    Parameter: diagnosticsStorage

    Resource ID(s) of storage systems that are used for diagnostics monitoring. Defaults to empty.

    • Required: No
    • Type: object
    • Default: {}

    Optional parameters

    ParameterTypeDescription
    eventHubAuthorizationRuleIdstringThe Authorisation Rule ID for an Event Hub that is used for monitoring data.
    eventHubNamestringThe name of an Event Hub that is used for monitoring data.
    marketplacePartnerIdstringThe Partner ID for a partner solution that is used for monitoring data.
    storageAccountResourceIdstringThe resource ID of a Storage Account that is used for monitoring data.
    workspaceResourceIdstringThe resource ID of a Log Analytics Workspace that is used for monitoring data.
    Parameter: diagnosticsStorage.eventHubAuthorizationRuleId

    The Authorisation Rule ID for an Event Hub that is used for monitoring data.

    • Required: No
    • Type: string
    Parameter: diagnosticsStorage.eventHubName

    The name of an Event Hub that is used for monitoring data.

    • Required: No
    • Type: string
    Parameter: diagnosticsStorage.marketplacePartnerId

    The Partner ID for a partner solution that is used for monitoring data.

    • Required: No
    • Type: string
    Parameter: diagnosticsStorage.storageAccountResourceId

    The resource ID of a Storage Account that is used for monitoring data.

    • Required: No
    • Type: string
    Parameter: diagnosticsStorage.workspaceResourceId

    The resource ID of a Log Analytics Workspace that is used for monitoring data.

    • Required: No
    • Type: string
    Parameter: dnsServers

    DNS Servers associated to the Virtual Network.

    • Required: No
    • Type: array
    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.

    • Required: No
    • Type: bool
    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

    ParameterTypeDescription
    namestringThe name of the route to create in that route table.
    routeTableResourceIdstringThe 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

    ParameterTypeDescription
    kindstringSpecify the type of lock.
    namestringSpecify 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

    ParameterTypeDescription
    remoteVirtualNetworkResourceIdstringThe 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

    ParameterTypeDescription
    allowForwardedTrafficboolWhether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. Default is true.
    allowGatewayTransitboolIf gateway links can be used in remote virtual networking to link to this virtual network. Default is false.
    allowVirtualNetworkAccessboolWhether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. Default is true.
    doNotVerifyRemoteGatewaysboolDo not verify the provisioning state of the remote gateway. Default is true.
    namestringThe Name of VNET Peering resource. If not provided, default value will be peer-localVnetName-remoteVnetName.
    remotePeeringAllowForwardedTrafficboolWhether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. Default is true.
    remotePeeringAllowGatewayTransitboolIf gateway links can be used in remote virtual networking to link to this virtual network. Default is false.
    remotePeeringAllowVirtualNetworkAccessboolWhether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space. Default is true.
    remotePeeringDoNotVerifyRemoteGatewaysboolDo not verify the provisioning state of the remote gateway. Default is true.
    remotePeeringEnabledboolDeploy the outbound and the inbound peering.
    remotePeeringNamestringThe name of the VNET Peering resource in the remove Virtual Network. If not provided, default value will be peer-remoteVnetName-localVnetName.
    remotePeeringUseRemoteGatewaysboolIf 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.
    useRemoteGatewaysboolIf 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

    ParameterTypeDescription
    principalIdstringThe principal ID of the principal (user/group/identity) to assign the role to.
    roleDefinitionIdOrNamestringThe 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

    ParameterTypeDescription
    conditionstringThe 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”.
    conditionVersionstringVersion of the condition.
    delegatedManagedIdentityResourceIdstringThe Resource Id of the delegated managed identity resource.
    descriptionstringThe description of the role assignment.
    namestringThe name (as GUID) of the role assignment. If not provided, a GUID will be generated.
    principalTypestringThe 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:
      [
        '2.0'
      ]
    • 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

    ParameterTypeDescription
    namestringThe Name of the subnet resource.

    Conditional parameters

    ParameterTypeDescription
    addressPrefixstringThe address prefix for the subnet. Required if addressPrefixes is empty.
    addressPrefixesarrayList of address prefixes for the subnet. Required if addressPrefix is empty.

    Optional parameters

    ParameterTypeDescription
    applicationGatewayIPConfigurationsarrayApplication gateway IP configurations of virtual network resource.
    defaultOutboundAccessboolSet 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.
    delegationstringThe delegation to enable on the subnet.
    natGatewayResourceIdstringThe resource ID of the NAT Gateway to use for the subnet.
    networkSecurityGroupResourceIdstringThe resource ID of the network security group to assign to the subnet.
    privateEndpointNetworkPoliciesstringenable or disable apply network policies on private endpoint in the subnet.
    privateLinkServiceNetworkPoliciesstringenable or disable apply network policies on private link service in the subnet.
    roleAssignmentsarrayArray of role assignments to create.
    routeTableResourceIdstringThe resource ID of the route table to assign to the subnet.
    serviceEndpointPoliciesarrayAn array of service endpoint policies.
    serviceEndpointsarrayThe service endpoints to enable on the subnet.
    sharingScopestringSet 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:
      [
        'Disabled'
        'Enabled'
      ]
    • MaxValue: 30
    Parameter: subnets.roleAssignments

    Array of role assignments to create.

    • Required: No
    • Type: array
    • MaxValue: 30

    Required parameters

    ParameterTypeDescription
    principalIdstringThe principal ID of the principal (user/group/identity) to assign the role to.
    roleDefinitionIdOrNamestringThe 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

    ParameterTypeDescription
    conditionstringThe 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”.
    conditionVersionstringVersion of the condition.
    delegatedManagedIdentityResourceIdstringThe Resource Id of the delegated managed identity resource.
    descriptionstringThe description of the role assignment.
    namestringThe name (as GUID) of the role assignment. If not provided, a GUID will be generated.
    principalTypestringThe 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:
      [
        '2.0'
      ]
    • 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
    Parameter: tags

    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

    OutputTypeDescription
    hubReturnRouteTableResourceIdsarrayThe resource IDs of the hub route tables that received a return route.
    networkResourceGroupResourceIdstringThe resource ID of the deployed virtual network.
    networkWatcherLocationstringThe location the resource was deployed into.
    networkWatchernamestringThe name of the deployed network watcher.
    networkWatcherResourceGroupIdstringThe resource group ID of the deployed network watcher.
    networkWatcherResourceGroupNamestringThe resource group the network watcher was deployed into.
    networkWatcherResourceIdstringThe resource ID of the deployed network watcher.
    nsgNamesarrayThe name of the route table.
    nsgNamesListarrayThe names of all Routes provided.
    nsgResourceIdsarrayThe resource ID of the route table.
    routeNamesListarrayThe names of all Routes provided.
    routeTableNamesarrayThe name of the route table.
    routeTableResourceIdsarrayThe resource ID of the route table.
    subnetNamesarrayThe names of the deployed subnets.
    subnetResourceIdsarrayThe resource IDs of the deployed subnets.
    virtualNetworkNamestringThe name of the virtual network.
    virtualNetworkResourceIdsstringThe 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).

    ReferenceType
    br/innofactor:avm/ptn/management/partner:0.1.0Remote reference
    br/public:avm/ptn/network/spoke-networking:<version>Remote reference
    br/public:avm/res/network/network-security-group:0.5.1Remote reference
    br/public:avm/res/network/network-watcher:0.4.1Remote reference
    br/public:avm/res/network/route-table:0.4.1Remote reference
    br/public:avm/res/network/virtual-network:0.7.0Remote reference
    br/public:avm/res/storage/storage-account:0.20.0Remote 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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    0.4.5

    Changes
    • Fixing network watcher storage (#197)
    Breaking Changes
    • None

    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
    • None

    0.4.3

    Changes
    • 193 avm module issue network landing zone is does not allow to customise the network watcher (#194)
    Breaking Changes
    • None

    0.4.2

    Changes
    • Enable vnet flow logs in workload-networking (#173)
    Breaking Changes
    • None

    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
    • None

    0.4.0

    Changes
    • Add disable bgp root propagation on route tables (#156)
    • Rename pattern module (#150)
    Breaking Changes
    • None

    Version history

    VersionPublished
    0.4.112026-11-11
    0.4.102025-08-31
    0.4.92025-08-16
    0.4.82025-08-01
    0.4.72025-07-31
    0.4.62025-07-16
    0.4.52025-07-02
    0.4.42025-07-01
    0.4.32025-06-30
    0.4.22025-05-29
    0.4.12025-03-01
    0.4.02025-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

    NameTypeRequiredDefaultDescription
    locklockType (object)YesOptional. The lock settings of the service.
    namestringYesRequired. Name of your Azure Custom Provider.
    actionsarrayNo[]Optional. Actions of the resource.
    enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
    locationstringNo"[resourceGroup().location]"Optional. Location for all Resources.
    resourceTypesarrayNo[]Optional. Resource Types of the resource.
    tagsobjectNoOptional. Tags of the resource.
    validationsarrayNo[]Optional. Validations endpoints of the resource.

    Outputs

    NameTypeDescription
    namestringThe Name of the Azure Custom Provider.
    resourceGroupNamestringThe name of the Resource Group.
    resourceIdstringThe resource ID of the Azure Custom Provider.

    Changelog

    No changelog has been published for this module yet. See the version history below.

    Version history

    VersionPublished
    0.1.02025-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

    Resource Types

    Resource TypeAPI Version
    Microsoft.Authorization/locks2020-05-01
    Microsoft.Authorization/roleAssignments2022-04-01
    Microsoft.Dashboard/grafana2023-09-01
    Microsoft.Insights/diagnosticSettings2021-05-01-preview
    Microsoft.Network/privateEndpoints2023-04-01
    Microsoft.Network/privateEndpoints/privateDnsZoneGroups2023-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/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

    ParameterTypeDescription
    namestringName of your Azure Grafana Dashboard.

    Optional parameters

    ParameterTypeDescription
    diagnosticSettingsarrayThe diagnostic settings of the service.
    enableApiKeyboolThe api key setting of the Grafana instance.
    enableDeterministicOutboundIPboolWhether a Grafana instance uses deterministic outbound IPs for this instancey.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    grafanaMajorVersionstringThe major version of Grafana to deploy. Azure currently accepts 12 and 13 for the Standard SKU; older majors are rejected.
    grafanaSkustringTier of your Azure Grafana Dashboard.
    locationstringLocation for all Resources.
    lockobjectThe lock settings of the service.
    managedIdentitiesobjectThe managed identity definition for this resource.
    privateEndpointsarrayConfiguration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. Note, requires the ‘acrSku’ to be ‘Premium’.
    publicNetworkAccessstringWhether 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’.
    roleAssignmentsarrayArray of role assignments to create.
    tagsobjectTags of the resource.
    zoneRedundancystringWhether 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.

    • Required: No
    • Type: array

    Optional parameters

    ParameterTypeDescription
    eventHubAuthorizationRuleResourceIdstringResource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
    eventHubNamestringName 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.
    logAnalyticsDestinationTypestringA string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
    logCategoriesAndGroupsarrayThe name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection.
    marketplacePartnerResourceIdstringThe full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
    metricCategoriesarrayThe name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection.
    namestringThe name of diagnostic setting.
    storageAccountResourceIdstringResource 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.
    workspaceResourceIdstringResource 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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: array

    Optional parameters

    ParameterTypeDescription
    categorystringName of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
    categoryGroupstringName of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs.
    enabledboolEnable 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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    Parameter: diagnosticSettings.logCategoriesAndGroups.enabled

    Enable or disable the category explicitly. Default is true.

    • Required: No
    • Type: bool
    Parameter: diagnosticSettings.marketplacePartnerResourceId

    The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.

    • Required: No
    • Type: string
    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: No
    • Type: array

    Required parameters

    ParameterTypeDescription
    categorystringName of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.

    Optional parameters

    ParameterTypeDescription
    enabledboolEnable 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.

    • Required: No
    • Type: bool
    Parameter: diagnosticSettings.name

    The name of diagnostic setting.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    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:
      [
        '12'
        '13'
      ]
    Parameter: grafanaSku

    Tier of your Azure Grafana Dashboard.

    • Required: No
    • Type: string
    • Default: 'Standard'
    • Allowed:
      [
        'Standard'
      ]
    Parameter: location

    Location for all Resources.

    • Required: No
    • Type: string
    • Default: [resourceGroup().location]
    Parameter: lock

    The lock settings of the service.

    • Required: No
    • Type: object

    Optional parameters

    ParameterTypeDescription
    kindstringSpecify the type of lock.
    namestringSpecify 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.

    • Required: No
    • Type: string
    Parameter: managedIdentities

    The managed identity definition for this resource.

    • Required: No
    • Type: object

    Optional parameters

    ParameterTypeDescription
    systemAssignedboolEnables system assigned managed identity on the resource.
    userAssignedResourceIdsarrayThe resource ID(s) to assign to the resource.
    Parameter: managedIdentities.systemAssigned

    Enables system assigned managed identity on the resource.

    • Required: No
    • Type: bool
    Parameter: managedIdentities.userAssignedResourceIds

    The resource ID(s) to assign to the resource.

    • Required: No
    • Type: array
    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: No
    • Type: array

    Required parameters

    ParameterTypeDescription
    subnetResourceIdstringResource ID of the subnet where the endpoint needs to be created.

    Optional parameters

    ParameterTypeDescription
    applicationSecurityGroupResourceIdsarrayApplication security groups in which the private endpoint IP configuration is included.
    customDnsConfigsarrayCustom DNS configurations.
    customNetworkInterfaceNamestringThe custom name of the network interface attached to the private endpoint.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    ipConfigurationsarrayA list of IP configurations of the private endpoint. This will be used to map to the First Party Service endpoints.
    isManualConnectionboolIf Manual Private Link Connection is required.
    locationstringThe location to deploy the private endpoint to.
    lockobjectSpecify the type of lock.
    manualConnectionRequestMessagestringA message passed to the owner of the remote resource with the manual connection request.
    namestringThe name of the private endpoint.
    privateDnsZoneGroupNamestringThe name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.
    privateDnsZoneResourceIdsarrayThe private DNS zone groups to associate the private endpoint with. A DNS zone group can support up to 5 DNS zones.
    roleAssignmentsarrayArray of role assignments to create.
    servicestringThe subresource to deploy the private endpoint for. For example “vault”, “mysqlServer” or “dataFactory”.
    tagsobjectTags 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.

    • Required: No
    • Type: array
    Parameter: privateEndpoints.customDnsConfigs

    Custom DNS configurations.

    • Required: No
    • Type: array

    Required parameters

    ParameterTypeDescription
    ipAddressesarrayA list of private IP addresses of the private endpoint.

    Optional parameters

    ParameterTypeDescription
    fqdnstringFqdn that resolves to private endpoint IP address.
    Parameter: privateEndpoints.customDnsConfigs.ipAddresses

    A list of private IP addresses of the private endpoint.

    • Required: Yes
    • Type: array
    Parameter: privateEndpoints.customDnsConfigs.fqdn

    Fqdn that resolves to private endpoint IP address.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.customNetworkInterfaceName

    The custom name of the network interface attached to the private endpoint.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.enableTelemetry

    Enable/Disable usage telemetry for module.

    • Required: No
    • Type: bool
    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: No
    • Type: array

    Required parameters

    ParameterTypeDescription
    namestringThe name of the resource that is unique within a resource group.
    propertiesobjectProperties 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

    ParameterTypeDescription
    groupIdstringThe ID of a group obtained from the remote resource that this private endpoint should connect to.
    memberNamestringThe member name of a group obtained from the remote resource that this private endpoint should connect to.
    privateIPAddressstringA 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.

    • Required: No
    • Type: bool
    Parameter: privateEndpoints.location

    The location to deploy the private endpoint to.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.lock

    Specify the type of lock.

    • Required: No
    • Type: object

    Optional parameters

    ParameterTypeDescription
    kindstringSpecify the type of lock.
    namestringSpecify 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.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.manualConnectionRequestMessage

    A message passed to the owner of the remote resource with the manual connection request.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.name

    The name of the private endpoint.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.privateDnsZoneGroupName

    The name of the private DNS zone group to create if privateDnsZoneResourceIds were provided.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: array
    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

    ParameterTypeDescription
    principalIdstringThe principal ID of the principal (user/group/identity) to assign the role to.
    roleDefinitionIdOrNamestringThe 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

    ParameterTypeDescription
    conditionstringThe 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”.
    conditionVersionstringVersion of the condition.
    delegatedManagedIdentityResourceIdstringThe Resource Id of the delegated managed identity resource.
    descriptionstringThe description of the role assignment.
    principalTypestringThe 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”.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.roleAssignments.conditionVersion

    Version of the condition.

    • Required: No
    • Type: string
    • Allowed:
      [
        '2.0'
      ]
    Parameter: privateEndpoints.roleAssignments.delegatedManagedIdentityResourceId

    The Resource Id of the delegated managed identity resource.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.roleAssignments.description

    The description of the role assignment.

    • Required: No
    • Type: string
    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”.

    • Required: No
    • Type: string
    Parameter: privateEndpoints.tags

    Tags to be applied on all resources/resource groups in this deployment.

    • Required: No
    • Type: object
    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:
      [
        'Disabled'
        'Enabled'
      ]
    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

    ParameterTypeDescription
    principalIdstringThe principal ID of the principal (user/group/identity) to assign the role to.
    roleDefinitionIdOrNamestringThe 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

    ParameterTypeDescription
    conditionstringThe 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”.
    conditionVersionstringVersion of the condition.
    delegatedManagedIdentityResourceIdstringThe Resource Id of the delegated managed identity resource.
    descriptionstringThe description of the role assignment.
    principalTypestringThe 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”.

    • Required: No
    • Type: string
    Parameter: roleAssignments.conditionVersion

    Version of the condition.

    • Required: No
    • Type: string
    • Allowed:
      [
        '2.0'
      ]
    Parameter: roleAssignments.delegatedManagedIdentityResourceId

    The Resource Id of the delegated managed identity resource.

    • Required: No
    • Type: string
    Parameter: roleAssignments.description

    The description of the role assignment.

    • Required: No
    • Type: string
    Parameter: roleAssignments.principalType

    The principal type of the assigned principal ID.

    • Required: No
    • Type: string
    • Allowed:
      [
        'Device'
        'ForeignGroup'
        'Group'
        'ServicePrincipal'
        'User'
      ]
    Parameter: tags

    Tags of the resource.

    • Required: No
    • Type: object
    Parameter: zoneRedundancy

    Whether or not zone redundancy is enabled for this Grafana dashboard.

    • Required: No
    • Type: string
    • Default: 'Disabled'
    • Allowed:
      [
        'Disabled'
        'Enabled'
      ]

    Outputs

    OutputTypeDescription
    locationstringThe location the resource was deployed into.
    loginServerstringThe reference to the Azure Grafana Dashboard.
    namestringThe Name of the Azure Grafana Dashboard.
    resourceGroupNamestringThe name of the Azure Grafana Dashboard.
    resourceIdstringThe resource ID of the Azure Grafana Dashboard.
    systemAssignedMIPrincipalIdstringThe 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).

    ReferenceType
    br/public:avm/res/network/private-endpoint:0.4.1Remote 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
    • None

    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
    • None

    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
    • None

    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
    • None

    Version history

    VersionPublished
    0.2.02026-11-10
    0.1.32025-02-01
    0.1.22025-01-31
    0.1.12025-01-29
    0.1.02025-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.

    Features

    • Azure Route Server Deployment: Deploys a fully managed Azure Route Server instance.
    • BGP Peering: Supports configuration of BGP peers for dynamic route exchange.
    • Public IP Configuration: Automatically creates and associates a public IP address.
    • Diagnostic Settings: Enables configurable diagnostic logs and metrics.
    • RBAC Support: Allows role-based access control assignments.
    • Azure Firewall Integration: Optional association with Azure Firewall.
    • Customizable ASN: Configurable Autonomous System Number (ASN) for the Route Server.
    • Scaling Configuration: Adjustable minimum capacity for scaling.
    • Branch-to-Branch Traffic Control: Option to enable or disable branch-to-branch traffic.

    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

    Resource TypeAPI Version
    Microsoft.Authorization/locks2020-05-01
    Microsoft.Authorization/roleAssignments2022-04-01
    Microsoft.Insights/diagnosticSettings2021-05-01-preview
    Microsoft.Network/publicIPAddresses2023-09-01
    Microsoft.Network/virtualHubs2024-01-01
    Microsoft.Network/virtualHubs/bgpConnections2020-06-01
    Microsoft.Network/virtualHubs/ipConfigurations2024-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/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

    ParameterTypeDescription
    vNetResourceIdstringThe resource ID of the virtual network that the Route Server will be deployed into.

    Optional parameters

    ParameterTypeDescription
    allowBranchToBranchTrafficboolFlag to control transit for Route Server. Defaults to false.
    azureFirewallResourceIdstringThe Azure Firewall associated with this Route Server.
    bgpPeersarrayAn array detailing the remote BGP peers of this Route Server.
    diagnosticSettingsarrayThe diagnostic settings of the service.
    domainNameLabelstringDNS 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.
    enableTelemetryboolEnable/Disable usage telemetry for module.
    hubRoutingPreferencestringThe routing preference of this Route Server. Possible values are ASPath, ExpressRoute or VpnGateway. The default is ExpressRoute.
    locationstringLocation for all resources.
    lockobjectThe lock settings of the service.
    minCapacityintAn integer value that configuresminimum number of scale units for this Route Server. The Minimum is 0. The default is 2.
    namestringName of the Network Watcher resource (hidden).
    publicIpDiagnosticSettingsarrayThe diagnostic settings of the Public IP.
    publicIPPrefixResourceIdstringResource ID of a Public IP Prefix object. This is only needed if you want your Public IP created in a PIP Prefix.
    roleAssignmentsarrayArray of role assignments to create.
    tagsobjectTags of the resource.
    virtualRouterAsnintAn integer value that configures the ASN for this Route Server. The range of values is 0-4294967295. The default is 65515.
    zonesarrayA 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

    ParameterTypeDescription
    namestringThe unique name of the remote BGP peer.
    peerAsnintAn integrer representing the ASN of the remote BGP peer.
    peerIpstringThe 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.

    • Required: Yes
    • Type: int
    Parameter: bgpPeers.peerIp

    The IP address of the remote BGP peer.

    • Required: Yes
    • Type: string
    Parameter: diagnosticSettings

    The diagnostic settings of the service.

    • Required: No
    • Type: array

    Optional parameters

    ParameterTypeDescription
    eventHubAuthorizationRuleResourceIdstringResource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
    eventHubNamestringName 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.
    logAnalyticsDestinationTypestringA string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
    logCategoriesAndGroupsarrayThe name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection.
    marketplacePartnerResourceIdstringThe full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
    metricCategoriesarrayThe name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection.
    namestringThe name of diagnostic setting.
    storageAccountResourceIdstringResource 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.
    workspaceResourceIdstringResource 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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: array

    Optional parameters

    ParameterTypeDescription
    categorystringName of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
    categoryGroupstringName of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs.
    enabledboolEnable 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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    Parameter: diagnosticSettings.logCategoriesAndGroups.enabled

    Enable or disable the category explicitly. Default is true.

    • Required: No
    • Type: bool
    Parameter: diagnosticSettings.marketplacePartnerResourceId

    The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.

    • Required: No
    • Type: string
    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: No
    • Type: array

    Required parameters

    ParameterTypeDescription
    categorystringName of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.

    Optional parameters

    ParameterTypeDescription
    enabledboolEnable 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.

    • Required: No
    • Type: bool
    Parameter: diagnosticSettings.name

    The name of diagnostic setting.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: string
    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.

    • Required: No
    • Type: object

    Optional parameters

    ParameterTypeDescription
    kindstringSpecify the type of lock.
    namestringSpecify 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.

    • Required: No
    • Type: string
    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

    ParameterTypeDescription
    eventHubAuthorizationRuleResourceIdstringResource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to.
    eventHubNamestringName 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.
    logAnalyticsDestinationTypestringA string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type.
    logCategoriesAndGroupsarrayThe name of logs that will be streamed. “allLogs” includes all possible logs for the resource. Set to [] to disable log collection.
    marketplacePartnerResourceIdstringThe full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
    metricCategoriesarrayThe name of metrics that will be streamed. “allMetrics” includes all possible metrics for the resource. Set to [] to disable metric collection.
    namestringThe name of diagnostic setting.
    storageAccountResourceIdstringResource 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.
    workspaceResourceIdstringResource 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

    ParameterTypeDescription
    categorystringName of a Diagnostic Log category for a resource type this setting is applied to. Set the specific logs to collect here.
    categoryGroupstringName of a Diagnostic Log category group for a resource type this setting is applied to. Set to allLogs to collect all logs.
    enabledboolEnable 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

    ParameterTypeDescription
    categorystringName of a Diagnostic Metric category for a resource type this setting is applied to. Set to AllMetrics to collect all metrics.

    Optional parameters

    ParameterTypeDescription
    enabledboolEnable 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

    ParameterTypeDescription
    principalIdstringThe principal ID of the principal (user/group/identity) to assign the role to.
    roleDefinitionIdOrNamestringThe 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

    ParameterTypeDescription
    conditionstringThe 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”.
    conditionVersionstringVersion of the condition.
    delegatedManagedIdentityResourceIdstringThe Resource Id of the delegated managed identity resource.
    descriptionstringThe description of the role assignment.
    namestringThe name (as GUID) of the role assignment. If not provided, a GUID will be generated.
    principalTypestringThe 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:
      [
        '2.0'
      ]
    • 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
    Parameter: tags

    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:
      [
        1
        2
        3
      ]
    • Allowed:
      [
        1
        2
        3
      ]
    • MinValue: 0
    • MaxValue: 4294967295

    Outputs

    OutputTypeDescription
    ipAddressesarrayThe IP addresses of the Route Server.
    locationstringThe location the resource was deployed into.
    namestringThe name of the Route Server.
    resourceGroupNamestringThe resource group the Route Server was deployed.
    resourceIdstringThe 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).

    ReferenceType
    br/innofactor:avm/res/network/route-serverRemote reference
    br/public:avm/res/network/public-ip-address:0.7.0Remote 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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    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
    • None

    0.1.0

    Changes
    • Adding missing docs for route server (#186)
    • Updates to route server (#179)
    • New route-server module (#178)
    Breaking Changes
    • None

    Version history

    VersionPublished
    0.1.142026-11-16
    0.1.132025-11-16
    0.1.122025-11-01
    0.1.112025-10-31
    0.1.102025-10-16
    0.1.92025-10-01
    0.1.82025-09-16
    0.1.72025-09-01
    0.1.62025-08-16
    0.1.52025-08-01
    0.1.42025-07-31
    0.1.32025-07-16
    0.1.22025-07-01
    0.1.12025-06-16
    0.1.02025-06-04

    Tags

    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

    • Subscription-Level Tagging: Apply tags directly to an Azure subscription.
    • Resource Group Tagging: Assign tags to a specific resource group within a subscription.
    • Tag Merging (Optional): Instead of overwriting existing tags, merge new ones with existing ones.

    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

    NameTypeRequiredDefaultDescription
    enableTelemetryboolNotrueOptional. Enable/Disable usage telemetry for module.
    locationstringNo"[deployment().location]"Optional. Location for all Resources.
    onlyUpdateboolNofalseOptional. Instead of overwriting the existing tags, combine them with the new tags.
    resourceGroupNamestringNo""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.
    subscriptionIdstringNo"[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.
    tagsobjectNoOptional. Tags of the resource.

    Outputs

    NameTypeDescription
    namestringThe name of the tags resource.
    resourceIdstringThe resource ID of the applied tags.
    tagsobjectThe applied tags.

    Changelog

    No changelog has been published for this module yet. See the version history below.

    Version history

    VersionPublished
    0.1.12026-11-09
    0.1.02025-02-13