Peering between Virtual Network to Virtual Hub

Lior Elayev 66 Reputation points
2022-12-27T15:52:19.697+00:00

Hello,
I created a "Virtual network connection" from a virtual Hub to Virtual Network.
I saw that from the Virtual Network side a peering connection was created.
My question is how can I know which Hub is this peering connected to? (except for extracting his name from the generated id)
On the peer ID (called also Remote virtual network in Azure) I got some ID that AZURE generates that looks like the following:

/subscriptions/4cc72ec3-2cfb-40a3-b9b4-4f12c94b2f44/resourceGroups/RG_VirtualHub1_2e02cac7-c115-4900-b5f2-395e20174908/providers/Microsoft.Network/virtualNetworks/HV_VirtualHub1_34942b50-bb09-4e9f-917c-f729fdc7eb41

*The subscription ID is not the subscription that the Hub exists on.
*The resourceGroup ID is not the resourceGroup that the Hub exists on.
*The "virtualNetworks" (it's a Hub at all) is not the virtual Hub id.

All the above are generated by Azure.

There is a way to know which Hub is this peering connected to (from the VNET side) by the real Hub ID?
I tried by the VNET peering API but I got the same generated ID

Thanks!

Azure Virtual WAN
Azure Virtual WAN
An Azure virtual networking service that provides optimized and automated branch-to-branch connectivity.
226 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,505 questions
0 comments No comments
{count} vote

Accepted answer
  1. ChaitanyaNaykodi-MSFT 26,216 Reputation points Microsoft Employee
    2022-12-28T00:46:42.933+00:00

    @Lior Elayev ,
    Thank you for reaching out. I tried this on my end and see that the Remote Vnet Id described above is a GUID created internally.

    As documented here a virtual network can only be connected to one virtual hub at a time. Can you try running the Hub Virtual Network Connections - Get REST API instead? In the response you should get the Virtual Network listed in the remoteVirtualNetwork section.

    274415-image.png

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.