Description
For some reason, the Point-to-Site code does not allow a root cert to be added to the vpn-gateway until address prefixes have been added to the vpn-gateway. If you don't know this (like me) and try to add a root certificate first, you should see an error indicating this. However, when I run the command:
az network vpn-gateway root-cert create --gateway-name PythonP2Sgw -n PythonRootCert --public-cert-data <properly pasted cert data> -g TestingPortalRG
It simply outputs the json object of the vpn-gateway (below), and yet the only way I would know something is wrong is if I knew that I should see the Cert Data (that I had properly pasted in the command) appear in the json object, which it does not. My guess is that the field for the root cert exists within the field for address prefixes, so there isn't anywhere to display that something has failed. I like that the object is displayed, but we need a proper error message here.
{
"activeActive": false,
"bgpSettings": {
"asn": 65515,
"bgpPeeringAddress": "10.5.0.30",
"peerWeight": 0
},
"enableBgp": false,
"etag": "W/\"6c70e40b-a157-4214-9e28-0137e23f2cd8\"",
"gatewayDefaultSite": null,
"gatewayType": "Vpn",
"id": "/subscriptions/ce10b6d0-d230-4cf7-845b-eeb1f8a071e9/resourceGroups/TestingPortalRG/providers/Microsoft.Network/virtualNetworkGateways/PythonP2Sgw",
"ipConfigurations": [
{
"etag": "W/\"6c70e40b-a157-4214-9e28-0137e23f2cd8\"",
"id": "/subscriptions/ce10b6d0-d230-4cf7-845b-eeb1f8a071e9/resourceGroups/TestingPortalRG/providers/Microsoft.Network/virtualNetworkGateways/PythonP2Sgw/ipConfigurations/vnetGatewayConfig",
"name": "vnetGatewayConfig",
"privateIpAllocationMethod": "Dynamic",
"provisioningState": "Succeeded",
"publicIpAddress": {
"id": "/subscriptions/ce10b6d0-d230-4cf7-845b-eeb1f8a071e9/resourceGroups/TestingPortalRG/providers/Microsoft.Network/publicIPAddresses/PythonP2Sip",
"resourceGroup": "TestingPortalRG"
},
"resourceGroup": "TestingPortalRG",
"subnet": {
"id": "/subscriptions/ce10b6d0-d230-4cf7-845b-eeb1f8a071e9/resourceGroups/TestingPortalRG/providers/Microsoft.Network/virtualNetworks/PythonP2Svnet/subnets/GatewaySubnet",
"resourceGroup": "TestingPortalRG"
}
}
],
"location": "westus",
"name": "PythonP2Sgw",
"provisioningState": "Succeeded",
"resourceGroup": "TestingPortalRG",
"resourceGuid": "1e0c2cee-a79d-4f52-853c-7a9aac90c75e",
"sku": {
"capacity": 2,
"name": "Standard",
"tier": "Standard"
},
"tags": {},
"type": "Microsoft.Network/virtualNetworkGateways",
"vpnClientConfiguration": null,
"vpnType": "RouteBased"
}