【问题标题】:AnotherOperationInProgress when deploying multiple Azure virtual networks and subnets with ARM at once一次使用 ARM 部署多个 Azure 虚拟网络和子网时的 AnotherOperationInProgress
【发布时间】:2020-06-17 08:07:01
【问题描述】:

我想使用这些 vnet/子网部署虚拟网络设置

  • 前端
    • 防火墙
    • 应用程序
    • API
  • 集群
    • 入口
    • 代理

每个子网都包含在相应虚拟网络的 "resources": [...] 数组中,每个子网都具有 vnet 作为依赖项,如下所示:

            {
                "apiVersion": "2020-04-01",
                "type": "subnets",
                "location": "[parameters('location')]",
                "name": "ingress",
                "dependsOn": [
                    "[parameters('vnetNameCluster')]"
                ],
                "properties": {
                    "addressPrefix": "[parameters('subnetPrefixIngress')]"
                }
            }

但是在部署虚拟网络时,经常会引发冲突:

{
    "error": {
        "code": "AnotherOperationInProgress",
        "message": "Another operation on this or dependent resource is in progress. To retrieve status of the operation use uri: https://management.azure.com/subscriptions/xxxxxx/providers/Microsoft.Network/locations/westus/operations/yyyyyyyyyyyyyyy?api-version=2020-04-01.",
        "details": []
    }
}

我可以添加什么依赖项来避免这种冲突?

【问题讨论】:

    标签: azure-resource-manager azure-virtual-network azure-template


    【解决方案1】:

    经过反复试验,我通过在虚拟网络中添加前一个子网作为依赖项来避免冲突 - 因此第一个子网仍然只依赖于虚拟网络:

                {
                    "apiVersion": "2020-04-01",
                    "type": "subnets",
                    "location": "[parameters('location')]",
                    "name": "agents",
                    "dependsOn": [
                        "[parameters('vnetNameCluster')]",
                        "[resourceId('Microsoft.Network/virtualNetworks/subnets',parameters('vnetNameCluster'),'ingress')]"
                    ],
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-24
    • 2014-11-25
    • 2015-04-09
    • 2020-08-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多