diff --git a/avm/res/network/virtual-network/main.bicep b/avm/res/network/virtual-network/main.bicep index 2d272099bc..28c1db21ae 100644 --- a/avm/res/network/virtual-network/main.bicep +++ b/avm/res/network/virtual-network/main.bicep @@ -167,6 +167,7 @@ resource virtualNetwork 'Microsoft.Network/virtualNetworks@2023-04-01' = { // You can safely remove the below child module (virtualNetwork_subnets) in your consumption of the module (virtualNetworks) to reduce the template size and duplication. //NOTE End : ------------------------------------ +@batchSize(1) module virtualNetwork_subnets 'subnet/main.bicep' = [ for (subnet, index) in subnets: { name: '${uniqueString(deployment().name, location)}-subnet-${index}' diff --git a/avm/res/network/virtual-network/main.json b/avm/res/network/virtual-network/main.json index e6058d7533..900b04583d 100644 --- a/avm/res/network/virtual-network/main.json +++ b/avm/res/network/virtual-network/main.json @@ -483,7 +483,9 @@ "virtualNetwork_subnets": { "copy": { "name": "virtualNetwork_subnets", - "count": "[length(parameters('subnets'))]" + "count": "[length(parameters('subnets'))]", + "mode": "serial", + "batchSize": 1 }, "type": "Microsoft.Resources/deployments", "apiVersion": "2022-09-01",