Hub-and-spoke is the default network design for most Azure landing zones, and the basic version is easy: a hub VNet, some spoke VNets, and peerings between them.
The problems show up later, usually the first time you add a third spoke, turn on a firewall, or wonder why two spokes can't talk to each other. Here are five gotchas worth knowing before they bite, with the Bicep to avoid each one.
1. Deploying several peerings at once fails at random
If you create peerings in a loop, you'll eventually see this:
AnotherOperationInProgress: Another operation on this or dependent resource is in progress.
Enter fullscreen mode
Exit fullscreen mode
Every peering is a child of the hub VNet, and Azure only allows one update to a VNet at a time. A Bicep loop deploys in parallel by default, so several peerings hit the hub together and some fail.…