{"id":165,"date":"2017-01-24T00:00:00","date_gmt":"2013-01-01T00:00:00","guid":{"rendered":"https:\/\/www.sqlhammer.com\/connecting-azure-regions"},"modified":"2026-03-18T21:52:47","modified_gmt":"2026-03-18T21:52:47","slug":"connecting-azure-regions","status":"publish","type":"post","link":"https:\/\/sqlhammer.com\/index.php\/2017\/01\/24\/connecting-azure-regions\/","title":{"rendered":"Connecting your Azure regions"},"content":{"rendered":"<p>In this post, I am going to demonstrate how to configure virtual network gateways in Azure using Resource Manager. This is important for connecting two Azure regions together, enabling you to setup high-availability and\/or disaster recovery systems.<\/p>\n<h2>1. Resource Groups<\/h2>\n<p>Begin by creating or selecting a resource group in each of the regions that you want to connect. Below are the steps for creating a resource group in the Azure US West 2 region.<\/p>\n<p>Click on the hamburger (<a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3542\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/hamburger.png\" alt=\"\" \/><\/a>) button on the upper left of the Azure Resource Manager portal to expand the names of the left tool bar, if needed. Then select Resource groups.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3529\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-toolbar.png\" alt=\"\" \/><\/a><\/p>\n<p>Select Add. Then name your group and choose the region and subscription for it to use. Click create.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3528\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-create-RG.png\" alt=\"\" \/><\/a><\/p>\n<p>Repeat these steps for your other region(s).<\/p>\n<h2>2. Virtual Networks<\/h2>\n<p>Each region will have a virtual network which the gateways will connect.<\/p>\n<p>Click the New button from the left side bar of your Azure portal. In the search box at the top, search for Virtual Network and select the Virtual Network object.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3530\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vn-1.png\" alt=\"\" \/><\/a><\/p>\n<p>Verify that the deployment model says Resource Manager and click Create.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3531\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vn-2.png\" alt=\"\" \/><\/a><\/p>\n<p>Populate all of the settings in the create wizard. It is important to make your address space large enough to contain additional which we will create later. Put one virtual network into each of your resource groups.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3532\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vn-3.png\" alt=\"\" \/><\/a><\/p>\n<h2>3. Create Virtual Network Gateways<\/h2>\n<p>In order to create the virtual network gateways, I have to create gateway subnets in each of the virtual networks.<\/p>\n<p>Select the virtual network and navigate to the address space and add a new address space for your gateway.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3533\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-1.png\" alt=\"\" \/><\/a><\/p>\n<p>Click save and then navigate to the subnets page and click the add gateway subnet button.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3534\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-2.png\" alt=\"\" \/><\/a><\/p>\n<p>Populate the address range with a range that fits into your newest address space and click OK.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3535\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-3.png\" alt=\"\" \/><\/a><\/p>\n<p>When complete you will have both your regular and gateway subnets available.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3536\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-4.png\" alt=\"\" \/><\/a><\/p>\n<p>Click the new button in the top left again and search for virtual network gateway. Select the object and click create.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3537\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-5.png\" alt=\"\" \/><\/a><\/p>\n<p>Refer to <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/vpn-gateway\/vpn-gateway-about-vpn-gateway-settings\">Microsoft documentation<\/a> for the difference between gateway types, VPN types, and SKUs. All of them will work but with different costs and benefits. For this demonstration, I am sticking with a basic VPN.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3538\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-6.png\" alt=\"\" \/><\/a><\/p>\n<p>Select the region specific virtual network that you created previously.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3539\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-7.png\" alt=\"\" \/><\/a><\/p>\n<p>Create or select a public IP address to use.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3540\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-8.png\" alt=\"\" \/><\/a><\/p>\n<p>Verify your region selection and click create.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3541\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-vng-9.png\" alt=\"\" \/><\/a><\/p>\n<p>As the portal warns, creating the gateway can take 45 minutes. While you are waiting, repeat these steps to create a virtual network gateway on the other region.<\/p>\n<h2>4. Connect Virtual Network Gateways<\/h2>\n<p>Once both of the gateways finish provisioning, they need to be connected in two directions. Open your first virtual network gateway, navigate to the connections pages, and click add.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3525\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-connect-vng-1.png\" alt=\"\" \/><\/a><\/p>\n<p>Name the connection, select your other gateway as the secondary, and supply a shared key.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3526\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-connect-vng-2.png\" alt=\"\" \/><\/a><\/p>\n<p>Repeat these steps, connecting the gateways in the other direction and then verify their status display as connected and succeeded.<\/p>\n<p><a href=\"http:\/\/www.sqlhammer.com\/?attachment_id=3527\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/ARM-connect-vng-3.png\" alt=\"\" \/><\/a><\/p>\n<h2>Next steps<\/h2>\n<p>At this point the regions are connected and virtual machines can be created with either of the virtual networks. They will be able to speak to each other through the virtual network gateways and high-availability \/ disaster recovery systems can be configured.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I am going to demonstrate how to configure virtual network gateways in Azure using Resource Manager. This is important for connecting two Azure regions together, enabling you to setup high-availability and\/or disaster recovery systems. 1. Resource Groups Begin by creating or selecting a resource group in each of the regions that you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":557,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,5,7,10,12,13,14,15,16,21],"tags":[],"class_list":["post-165","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administration","category-alwayson-availability-groups","category-azure","category-community","category-disaster-recovery","category-high-availability","category-microsoft-sql-server","category-performance","category-powershell","category-sql-agent","category-t-sql"],"_links":{"self":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":1,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/posts\/165\/revisions\/427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/media\/557"}],"wp:attachment":[{"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlhammer.com\/index.php\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}