Hello,
sorry for the late response.
I resolved the issue myself by changing the deployment mode on the copy loop we used within the ARM template.
Anyway, for future reference it may help to describe the issue and solution for others.
We deploy our IPGroups via an ARM template that takes the ipgroups as a parameter. The ARM template uses a copy loop to deploy the IP Groups to the defined Resource Group. The copy mode was not set specifically, so ARM uses parallel.
Having only some IPGroups (like 2 to 5) was not an issue. But starting with more IPGroups, the deployment failed.
Setting the Copy-Mode to "serial" resolved this issue.
Now, our deployments take a lot time, since the loop is not running in parallel anymore, but at least the pipelines don't fail anymore.
We could start playing around with batchSize and serial-mode, but at the moment it works as is.
The following ARM Module works for us:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"ipGroups": {
"type": "array",
"metadata": {
"description": "Required. An array of IP Group objects."
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Optional. Location for all resources."
}
}
},
"variables": {},
"resources": [
{
"apiVersion": "2020-05-01",
"type": "Microsoft.Network/ipGroups",
"name": "[parameters('ipGroups')[copyIndex()].name]",
"location": "[parameters('location')]",
"tags": "[parameters('ipGroups')[copyIndex()].tags]",
"properties": {
"ipAddresses": "[parameters('ipGroups')[copyIndex()].ipAddresses]"
},
"copy": {
"name": "ipGroupLoop",
"count": "[length(parameters('ipGroups'))]",
"mode": "serial"
}
}
],
"outputs": {
"ipGroupResourceId": {
"type": "array",
"copy": {
"count": "[length(parameters('ipGroups'))]",
"input": "[resourceId('Microsoft.Network/ipGroups', parameters('ipGroups')[copyIndex()].name)]"
}
}
}
}