Skip to content

The add command throws an error when used on an existing created virtual hub.  #1168

@annerajb

Description

@annerajb

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.

Metadata

Metadata

Assignees

Labels

Network - Virtual WANService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions