Json dependsOn 忽略
Json dependsOn ignored
您好,我有这段代码可以部署一些虚拟机和一个 vpn 解决方案,但是它会在部署 vnet 之前部署 "vmRdsDeployment"
。我已经尝试了 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."
}
]
在这种情况下,错误似乎是由于 vnet 被调节为不使用 "condition": false
部署,在更改为 true
后一切都按预期工作。
您好,我有这段代码可以部署一些虚拟机和一个 vpn 解决方案,但是它会在部署 vnet 之前部署 "vmRdsDeployment"
。我已经尝试了 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."
}
]
在这种情况下,错误似乎是由于 vnet 被调节为不使用 "condition": false
部署,在更改为 true
后一切都按预期工作。