Forum Discussion
Does vNet peering cause a circular dependency error in Automation script?
I am sorry if someone has asked this before. I did search a while and could not find anything. When a peering is set up between two vNets, VNET1 and VNET2, there would be two 'dependsOn' properties in the template generated from the Automation script blade of the resource group. VNET1 would depend on VNET2, and VNET2 would depend on VNET1. This causes a circular dependency error and the deployment of the template would fail. If you manually remove the two 'dependsON' properties, the deployment would succeed with the same result. Why does vNet peering add the dependency properties in the template which cause circular dependency error? Thanks
- mouadcherkaouiBrass Contributor
Hi xiaochenchi,
it seems that this is product feedback, I think that since the generation of arm templates is automated then the system detects that there is a dependency between the two VNets and then generate the template to reflect this cross-dependency, I think this is apparent in VNets case but I think that there are situations where the generation system will reproduce the same situation but with different resources, anyway I posted feedback on this link https://feedback.azure.com/forums/217313-networking/suggestions/37127734-vnet-peering-circular-dependency-reference-due-to