azure-cli: Azure Network VPC Peering Create Fails v2.1.6.0
Describe the bug
With the new CLI release, vnet peering create returns an error BadRequestError: Cannot parse the request.
Portal Activity logs show full error:
"statusMessage": "{\"error\":{\"code\":\"InvalidRequestFormat\",\"message\":\"Cannot parse the request.\",\"details\":[{\"code\":\"InvalidJson\",\"message\":\"Could not find member 'syncRemoteAddressSpace' on object of type 'VirtualNetworkPeeringProperties'. Path 'properties.syncRemoteAddressSpace', line 1, position 558.\"}]}}",
To Reproduce az network vnet peering create --name network1 --vnet-name vnet1 --remote-vnet vnet2 --allow-vnet-access --resource-group rg1
Expected behavior Expected a peering connection to be created. Environment summary Azure CLI version 2.16 on Linux
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 20 (7 by maintainers)
Thanks for reporting and we’re debugging it now
The same problem appears when working in the Sandbox on Microsoft learn: https://docs.microsoft.com/en-us/learn/modules/integrate-vnets-with-vnet-peering/4-exercise-configure-vnet-peering-connections-using-azure-cli-commands
az network vnet peering create
–name SalesVNet-To-MarketingVNet
–remote-vnet MarketingVNet
–resource-group learn-114ae29b-9f47-45ff-b4e7-58b1610d04b7
–vnet-name SalesVNet
–allow-vnet-access
-> BadRequestError: Cannot parse the request.
An edge build with fix is ready for you, you can use this build before our official release on 12/29.