嗨,我有这段代码,它部署了一些虚拟机和一个 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."
}
]