Azure / Azure/azure-cli-extensions
The add command throws an error when used on an existing created virtual hub.
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
Sample command:
```
az network vhub route add -g rg-Hub --vhub-name east-us-hub --address-prefixes "32.0.0.0/3" "64.0.0.0/2" "128.0.0.0/3" "160.0.0.0/5" "160.0.0.0/7" "170.0.0.0/8" "171.0.0.0/12" "172.32.0.0/11" "172.64.0.0/10" "172.128.0.0/9" "173.0.0.0/8" "174.0.0.0/7" "176.0.0.0/4" "192.0.0.0/9" "192.128.0.0/11" "192.160.0.0/13" "193.0.0.0/8" "194.0.0.0/7" "196.0.0.0/6" "200.0.0.0/5" "224.0.0.0/3"
--next-hop "10.0.1.4"
```
This command returns a error like this:
> CannotChangeP2SVpnGatewayForExistingHub - Cannot change P2SVpnGateway for existing hub /subscriptions/subscription_id_redacted/resourceGroups/rg-Hub/providers/Microsoft.Network/virtualHubs/east-us-hub. The existing P2SVpnGateway is /subscriptions/subscription_id_redacted/resourceGroups/rg-Hub/providers/Microsoft.Network/p2sVpnGateways/asdasdasd-eastus-p2s-gw, the new P2SVpnGateway is .
If I run the list command I am able to see exactly the same routes shown on the website of the virtual hub routing table.
if I try adding routes from the CLI it returns the error about modifying an existing one.
Same error is detected when a route is tried to be removed using the remove command.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 2560f9e0-4b2e-4bba-3cf2-14f8918a73d1
* Version Independent ID: 5a4c158d-e801-f9d2-29ac-72086ce5436e
* Content: [az network vhub route](https://docs.microsoft.com/en-us/cli/azure/ext/virtual-wan/network/vhub/route?view=azure-cli-latest#ext-virtual-wan-az-network-vhub-route-list)
* Content Source: [latest/docs-ref-autogen/ext/virtual-wan/network/vhub/route.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/live/latest/docs-ref-autogen/ext/virtual-wan/network/vhub/route.yml)
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**
Contributor guide
Assessment
This issue has not been assessed yet.