Skip to content

Commit 8d49937

Browse files
committed
add note about subnet incremental deployments
1 parent 935aa80 commit 8d49937

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

articles/azure-resource-manager/templates/deployment-modes.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Deployment modes
33
description: Describes how to specify whether to use a complete or incremental deployment mode with Azure Resource Manager.
44
ms.topic: conceptual
5-
ms.date: 07/22/2020
5+
ms.date: 01/21/2022
66
---
77
# Azure Resource Manager deployment modes
88

@@ -45,10 +45,15 @@ If the resource group is [locked](../management/lock-resources.md), complete mod
4545

4646
In incremental mode, Resource Manager **leaves unchanged** resources that exist in the resource group but aren't specified in the template. Resources in the template **are added** to the resource group.
4747

48-
> [!NOTE]
48+
> [!IMPORTANT]
4949
> When redeploying an existing resource in incremental mode, all properties are reapplied. The **properties aren't incrementally added**. A common misunderstanding is to think properties that aren't specified in the template are left unchanged. If you don't specify certain properties, Resource Manager interprets the deployment as overwriting those values. Properties that aren't included in the template are reset to the default values. Specify all non-default values for the resource, not just the ones you're updating. The resource definition in the template always contains the final state of the resource. It can't represent a partial update to an existing resource.
50+
51+
> [!WARNING]
52+
> In rare cases, you can specify properties either on a resource or on one of its child resources. Two common examples are **subnets on virtual networks** and **site configuration values for web apps**. In these cases, you must handle incremental updates carefully.
53+
>
54+
> For subnets, specify the values through the `subnets` property on the [Microsoft.Network/virtualNetworks](/azure/templates/microsoft.network/virtualnetworks) resource. Don't define the values through the child resource [Microsoft.Network/virtualNetworks/subnets](/azure/templates/microsoft.network/virtualnetworks/subnets). As long as the subnets are defined on the virtual network, you can redeploy the virtual network and not lose the subnets.
5055
>
51-
> In rare cases, properties that you specify for a resource are actually implemented as a child resource. For example, when you provide site configuration values for a web app, those values are implemented in the child resource type `Microsoft.Web/sites/config`. If you redeploy the web app and specify an empty object for the site configuration values, the child resource isn't updated. However, if you provide new site configuration values, the child resource type is updated.
56+
> For site configuration values, the values are implemented in the child resource type `Microsoft.Web/sites/config`. If you redeploy the web app and specify an empty object for the site configuration values, the child resource isn't updated. However, if you provide new site configuration values, the child resource type is updated.
5257
5358
## Example result
5459

0 commit comments

Comments
 (0)