Delete a VPN gateway Stay organized with collections Save and categorize content based on your preferences.
The following procedures enable you to delete an HA VPN gatewayor a Classic VPN gateway. HA VPN uses thevpn-gateways command option, and Classic VPN uses thetarget-vpn-gateways command option.
After you delete an HA VPN gateway, any peer gatewayresources that you created still exist.
Before removing a Cloud VPN gateway,delete all associated VPN tunnels.
Delete an HA VPN gateway
To delete an existing HA VPN gateway, complete thefollowing steps.
Permissions required for this task
To perform this task, you must have been granted the following permissionsor the following IAM roles.
Permissions
compute.vpnGateways.getcompute.vpnGateways.listcompute.vpnGateways.createcompute.vpnGateways.deletecompute.vpnGateways.usecompute.vpnGateways.setLabelscompute.externalVpnGateways.getcompute.externalVpnGateways.listcompute.externalVpnGateways.createcompute.externalVpnGateways.deletecompute.externalVpnGateways.usecompute.externalVpnGateways.setLabels
Roles
roles/compute.networkAdmin
Console
In the Google Cloud console, go to theVPN page.
Find the row that contains theGateway name that you want to delete.
Click theGateway name.
On theGoogle VPN gateway details page, underVPN tunnels,select the checkboxes next to the tunnels that you want to delete.
To delete the tunnels, clickDelete.
In the confirmation dialog box, clickDelete.
To delete the gateway, at the top of the page, clickDelete.
In the confirmation dialog box, clickDelete.
gcloud
In the following commands, replace the following:
PROJECT_ID: the ID of your projectGATEWAY_NAME: the name of your VPN gatewayREGION: the region where your VPN gateway resides
To delete the gateway, follow these steps:
Identify the name and region of the VPN gateway that you wantto delete, and then use that information in later steps. To list all VPNgateways, run the following command:
gcloud compute vpn-gateways list --project=PROJECT_ID
Determine if the VPN gateway has any VPN tunnels that need to be deleted.To list all tunnels associated with the gateway, run the followingcommand:
gcloud compute vpn-gateways describeGATEWAY_NAME \ --region=REGION \ --project=PROJECT_ID \ --format='flattened(tunnels)'
Delete the VPN gateway:
gcloud compute vpn-gateways deleteGATEWAY_NAME \ --region=REGION \ --project=PROJECT_ID
API
To delete tunnels first, make a DELETE request by using thevpnTunnels.deletemethod:
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/vpnTunnels/TUNNEL_NAME
Make a DELETE request by using thevpnGateways.deletemethod:
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/vpnGateways/GATEWAY_NAME
Delete a Classic VPN gateway
Warning: Certain Classic VPN dynamic routing functionality is deprecated. For more information, see Classic VPN dynamic routing partial deprecation.To delete an existing Classic VPN gateway, complete thefollowing steps.
Permissions required for this task
To perform this task, you must have been granted the following permissionsor the following IAM roles.
Permissions
compute.vpnGateways.getcompute.vpnGateways.listcompute.externalVpnGateways.getcompute.externalVpnGateways.listcompute.vpnGateways.createcompute.vpnGateways.deletecompute.vpnGateways.getcompute.vpnGateways.listcompute.vpnGateways.usecompute.vpnGateways.setLabelscompute.externalVpnGateways.createcompute.externalVpnGateways.deletecompute.externalVpnGateways.getcompute.externalVpnGateways.listcompute.externalVpnGateways.usecompute.externalVpnGateways.setLabels
Roles
roles/compute.networkAdmin
Console
In the Google Cloud console, go to theVPN page.
Find the row that contains theGateway name that you want to delete.
Click theGateway name.
On theGoogle VPN gateway details page, underVPN tunnels,select the checkboxes next to the tunnels that you want to delete.
To delete the tunnels, clickDelete.
In the confirmation dialog box, clickDelete.
To delete the gateway, at the top of the page, clickDelete.
In the confirmation dialog box, clickDelete.
gcloud
In the following commands, replace the following:
PROJECT_ID: the ID of your projectGATEWAY_NAME: the name of your VPN gatewayREGION: the region where your VPN gateway residesFR_NAME: the name of each forwarding rule
To delete the gateway, follow these steps:
Identify the name and region of the VPN gateway that you wantto delete, and then use that information in later steps. To list all VPNgateways, run the following command:
gcloud compute target-vpn-gateways list --project=PROJECT_ID
Determine if the VPN gateway has any VPN tunnels that need to be deleted.To list all tunnels associated with the gateway, run the followingcommand:
gcloud compute target-vpn-gateways describeGATEWAY_NAME \ --region=REGION \ --project=PROJECT_ID \ --format='flattened(tunnels)'
Determine the names of the three forwarding rules associated with thetarget VPN gateway:
gcloud compute target-vpn-gateways describeGATEWAY_NAME \ --region=REGION \ --project=PROJECT_ID \ --format='flattened(forwardingRules)'
Delete the forwarding rules; repeat this command for each forwarding rule:
gcloud compute forwarding-rules deleteFR_NAME \ --region=REGION \ --project=PROJECT_ID
Delete the target VPN gateway:
gcloud compute target-vpn-gateways deleteGATEWAY_NAME \ --region=REGION \ --project=PROJECT_ID
API
To delete tunnels first, make a DELETE request by using thevpnTunnels.deletemethod:
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/vpnTunnels/TUNNEL_NAME
Make a DELETE request by using thetargetVpnGateways.deletemethod:
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/targetVpnGateways/GATEWAY_NAME
Recommended follow-up
After deleting a VPN gateway, consider doing the following:
- Review your firewall rules anddelete therules that you no longerneed.
- For Classic VPN, you candelete the external IPaddress previously used bythe VPN gateway.
What's next
- To view Cloud Logging and Monitoring information, seeView logs and metrics.
- To use high-availability and high-throughput scenarios or multiplesubnet scenarios, seeAdvanced configurations.
- To help you solve common issues that you might encounter when usingCloud VPN, seeTroubleshooting.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.