Skip to content

Associate a customer-controlled maintenance configuration#

Reliability · Virtual Network Gateway · Rule · Preview · 2024_06 · Important

Use a customer-controlled maintenance configuration for virtual network gateways.

Description#

Virtual network gateways require regular updates to maintain and enhance their functionality, reliability, performance, and security. These updates include patching software, upgrading networking components, and decommissioning outdated hardware.

By attaching virtual network gateways to a maintenance configuration, customers can schedule these updates to occur during a preferred maintenance window, ideally outside of business hours, to minimize disruptions.

Both the VPN and ExpressRoute virtual network gateway types support customer-controlled maintenance configurations.

Recommendation#

Consider using a customer-controlled maintenance configuration to efficiently schedule updates and minimize disruptions.

Examples#

Configure with Azure template#

To configure virtual network gateways that pass this rule:

  • Deploy a Microsoft.Maintenance/configurationAssignments sub-resource (extension resource).
  • Set the properties.maintenanceConfigurationId property to the linked maintenance configuration resource Id.

For example:

Azure Template snippet
{
  "type": "Microsoft.Maintenance/configurationAssignments",
  "apiVersion": "2023-04-01",
  "name": "[parameters('assignmentName')]",
  "location": "[parameters('location')]",
  "scope": "[format('Microsoft.Network/virtualNetworkGateways/{0}', parameters('name'))]",
  "properties": {
    "maintenanceConfigurationId": "[parameters('maintenanceConfigurationId')]"
  },
  "dependsOn": [
    "[resourceId('Microsoft.Network/virtualNetworkGateways', parameters('name'))]"
  ]
}

Configure with Bicep#

To configure virtual network gateways that pass this rule:

  • Deploy a Microsoft.Maintenance/configurationAssignments sub-resource (extension resource).
  • Set the properties.maintenanceConfigurationId property to the linked maintenance configuration resource Id.

For example:

Azure Bicep snippet
resource config 'Microsoft.Maintenance/configurationAssignments@2023-04-01' = {
  name: assignmentName
  location: location
  scope: virtualNetworkGateway
  properties: {
    maintenanceConfigurationId: maintenanceConfigurationId
  }
}

Notes#

This feature is currently in preview for both the VPN and ExpressRoute virtual network gateway types.

Comments