资源不是在模板

资源不是在模板

问题描述:

部署如下模板中定义:资源不是在模板

https://gist.github.com/rnkhouse/aea0a8fd395da37b19466348b919d620

错误:

"Deployment failed with status code: 400 and message: Deployment template validation failed: 'The resource 'Microsoft.Network/virtualNetworks/mtes-dev-VNET' is not defined in the template. Please see https://aka.ms/arm-template for usage details.'."

我已经创建的虚拟网络中的其他模板,这里使用同一资源组。但是,我仍然遇到了错误。请指教!

删除dependsOn代码中的Vnet,只有当该资源是模板的一部分时才需要,而不是已经部署的模板。

+0

删除它。仍然得到相同的错误。 –

+0

是的。我只是参考子网。因为我需要在新的子网中创建新的虚拟机。 –

+0

https://gist.github.com/rnkhouse/aea0a8fd395da37b19466348b919d620#file-02-azure-dbserver-json-L164 @RonakPatel – 4c74356b41