1

嗨,我有这段代码,它部署了一些虚拟机和一个 vpn 解决方案,但是它在部署"vmRdsDeployment"vnet 之前部署了。我尝试了几种不同的dependsOn变体,但似乎没有任何效果

错误是:

New-AzureRmResourceGroupDeployment : 18:38:57 - Resource Microsoft.Network/loadBalancers 'ilb-m21-m21-m21-vpn-rds' failed with message '{
  "error": {
    "code": "InvalidResourceReference",
    "message": "Resource /subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/RG-VPN-TEST/providers/Microsoft.Network/virtualNetworks/VNET-M21-M21-M21-VPN 
referenced by resource /subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/rg-vpn-test/providers/Microsoft.Network/loadBalancers/ilb-m21-m21-m21-vpn-rds 
was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.",
    "details": [
      {
        "code": "NotFound",
        "message": "Resource 
/subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/RG-VPN-TEST/providers/Microsoft.Network/virtualNetworks/VNET-M21-M21-M21-VPN not found."
      }
    ]

模板:https ://pastebin.com/rKRP5htc

4

1 回答 1

1

在这种情况下,错误似乎是由于 vnet"condition": false在更改为true一切按预期工作后被限制为不使用 部署。

于 2018-11-08T05:49:35.983 回答