Working with virtual network peerings
In Azure, virtual networks work as a way of isolating your services. By default, there’s no direct way of communicating between resources that span multiple networks. Of course, if you expose your services publicly (for example, via configuration in NSGs), you’ll be able to make a connection between them. However, what if you want to keep them private and still be able to connect? To achieve such functionality, you need to use network peering. Let’s discover that topic.
How does peering work?
When you set up a peering between networks, they will appear as a single network, even though they will be still separate Azure resources. This implies that your network cannot have overlapping address spaces – a problem we discussed at the very beginning of this chapter. Azure supports two types of peering – peering within the same region and global peering, which can be used if your networks are deployed to different...