I was able to resolve the issue. Resolution was to remove the VNet peering resource from main.bicep and calling it as a module instead with dependency on VNet's. Hope it might help someone.
Thanks,
Pradeep Reddy Patlolla
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
We are Creating 3 VNets(in same region) and trying to create peering between these. Bicep code is written in such a way that these VNETS/Peering are created in parallel. VNETS are getting created (alongwith subnets as described in the code),however peering is getting failed with the error ""Cannot proceed with operation because resource XXXXXXXX used by resource XXXXXXX is not in Succeeded state. Resource is in Updating state and the last operation that updated/is updating the resource is PutVirtualNetworkOperation."
We assume this is because for VNET1 the peering status is in "Updating" state and when peering is trying to happen because of this state its failing from other 2 VNETS. We tried with "dependson" but didnt help.
How to update the bicep code in such a way that deployment should wait for sometime (or) to check for a conditon where peering status is "initiated" (or) retry after sometime before actually the main.bicep file gets into failed state.Any other solutions to resolve our issue?
Thanks in advance.
I was able to resolve the issue. Resolution was to remove the VNet peering resource from main.bicep and calling it as a module instead with dependency on VNet's. Hope it might help someone.
Thanks,
Pradeep Reddy Patlolla