Deployment of Azure virtual network gateway

431 Views Asked by At

I am trying to create a virtual network gateway in Azure Portal and whenever I try I get the following error.

vnet-gateway-d was not found. Please make sure that the referenced resource exists, and that both resources are in the same region

Now that is the name of the gateway I am creating so I don't know why its complaining about that. I have checked and it is set to east us as is the vnet.

Let me know what other information I can provide.

1

There are 1 best solutions below

0
Imran On

I tried the same in my environment I got the same error like below:

VNet1GW was not found. Please make sure that the referenced resource exists, and that both resources are in the same region

enter image description here

This issue usually occurs if virtual network and the virtual network gateway aren’t in the same region and same resource group. Because the resources are in different regions, it's impossible to create the gateway.

You can make use of below command to check virtual network region in your resource group:

Get-AzVirtualNetwork -ResourceGroupName "<RGName>" | Select-Object Name, Location | Format-Table -AutoSize

enter image description here

In portal if you are selecting region as Eastus region while creating the virtual network gateway by default when you select virtual network the drop-down displays only the Eastus virtual network like below:

enter image description here

Now virtual network gateway is deployed successfully like below:

enter image description here

enter image description here

Reference:

Create a route-based virtual network gateway: PowerShell - Azure VPN Gateway | Microsoft Learn