question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vnet peering create --allow-vnet-access help text wrong?

See original GitHub issue

Describe the bug It seems to me that the help text for the --allow-vnet-access option of the “az network vnet peering create” command is wrong. I think the effect is the opposite.

To Reproduce Create two vnets in a resource group, “net-a” and “net-b”.

Create a vnet peering:

$ az network vnet peering create --subscription aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee --resource-group mhy20190410 --vnet net-a --name net-b-peering --remote-vnet /subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/mhy20190410/providers/Microsoft.Network/virtualNetworks/net-b --allow-vnet-access
{
  "allowForwardedTraffic": false,
  "allowGatewayTransit": false,
  "allowVirtualNetworkAccess": true,
  "etag": "W/\"5c7f3ea1-f893-411f-a593-6f4c2a7a1965\"",
  "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/mhy20190410/providers/Microsoft.Network/virtualNetworks/net-a/virtualNetworkPeerings/net-b-peering",
  "name": "net-b-peering",
  "peeringState": "Initiated",
  "provisioningState": "Succeeded",
  "remoteAddressSpace": {
    "addressPrefixes": [
      "10.0.2.0/24"
    ]
  },
  "remoteVirtualNetwork": {
    "id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/mhy20190410/providers/Microsoft.Network/virtualNetworks/net-b",
    "resourceGroup": "mhy20190410"
  },
  "resourceGroup": "mhy20190410",
  "type": "Microsoft.Network/virtualNetworks/virtualNetworkPeerings",
  "useRemoteGateways": false
}

The help text for option “–allow-vnet-access” as output by “az network vnet peering create -h” states:

    --allow-vnet-access            : Allows VMs in the remote VNet to access all VMs in the local
                                     VNet.

According to this help text, VMs in net-b will have access to all VMs in net-a.

Whereas the Azure portal displays the following:

VNet peering 2019-04-10 170914

Which indicates that VMs in net-a will have access to VMs in net-b, i.e. the opposite of what the CLI help states.

Expected behavior I believe the help text for option “–allow-vnet-access” should say the exact opposite.

Environment summary

Additional context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Am018commented, Apr 18, 2019

Agreed, this needs to be fixed in the Swagger document.

0reactions
tjprescottcommented, Apr 17, 2019

@Amo18 if I can get confirmation on whether Swagger or Portal is correct, I can make the update in CLI if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot virtual network peering issues | Microsoft Learn
This troubleshooting guide provides steps to help you resolve most virtual network peering issues. Diagram of virtual network peering. Configure ...
Read more >
Azure Virtual Network Connectivity Flashcards - Quizlet
Study with Quizlet and memorize flashcards containing terms like VNet Peering, VNet Peering in Power CLI, Azure VPN Gateways and more.
Read more >
"az network vnet peering create" results in "BadRequestError
It is something wrong or bug in the Azure CLI version azure-CLI 2.16.0 because I can reproduce it with cloud shell or upgrade...
Read more >
Azure virtual network peering - Aiven documentation
Azure virtual network peering# This help article contains step-by-step ... This leads to the Aiven platform creating a peering from the VNet in...
Read more >
Azure VNet Peering across Azure Active Directory tenants ...
In this this video, we look at how to create Azure Virtual Network Peering across subscriptions that are in different Azure Active Directory...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found