Skip to content

Parsing Errors when executing New-AzVirtualNetworkGatewayConnection command #10150

@Osmidon

Description

@Osmidon

I'm trying to create a new IKEV2 IPSec tunnel using the following MS article:
https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell

I get to the part where I execute the following command:
New-AzVirtualNetworkGatewayConnection -Name Azure-WEU-US01-IPSec-VPN -ResourceGroupName $RG1 -VirtualNetworkGateway1 $vnetgw1 -LocalNetworkGateway2 $lngw1 -Location $Location1 -ConnectionType IPsec -UsePolicyBasedTrafficSelectors $True -IpsecPolicies $ipsecpolicy6 -SharedKey 'XXXXXXXXXXXXX'

But then get the following parsing error:
New-AzVirtualNetworkGatewayConnection : Cannot parse the request.
StatusCode: 400
ReasonPhrase: Bad Request
ErrorCode: InvalidRequestFormat
ErrorMessage: Cannot parse the request.
Additional details:
Code: InvalidJson
Message: Could not find member 'trafficSelectorPolicies' on object of type 'VirtualNetworkGatewayConnectionProperties'. P
ath 'properties.trafficSelectorPolicies', line 75, position 30.
OperationID : 95142eb8-7da3-467e-8686-30de8cdeb19d
At line:1 char:1

  • New-AzVirtualNetworkGatewayConnection -Name $Connection16 -ResourceGr ...
  • CategoryInfo : CloseError: (:) [New-AzVirtualNetworkGatewayConnection], NetworkCloudException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.NewAzureVirtualNetworkGatewayConnectionCommand

This is the second connection I'm trying to create. The first one around 2-3 months ago was successful and did not present this error. Is there a bug in the current Azure CLI?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions