The following procedure applies to tunnels connected to either Classic VPN or to HA VPN gateways.
Deleting a VPN tunnel
To delete an existing Cloud VPN tunnel, do the following:
Console
- Go to the VPN tunnels page.
- Check the box next to the VPN tunnel you want to remove.
- At the top of the screen, click Delete.
- Click Delete again to confirm deletion.
gcloud
In the following commands, replace [PROJECT_ID]
with the ID of your
project.
Identify the name and region of the VPN tunnel you need to remove. To list all VPN tunnels in your project:
gcloud compute vpn-tunnels list --project [PROJECT_ID]
Once you identify the VPN tunnel, replace
[NAME]
and[REGION]
with its name and region in the following steps.Delete the tunnel using this command:
gcloud compute vpn-tunnels delete [NAME] \ --region [REGION] \ --project [PROJECT_ID]
API
Make a DELETE request with the
vpnTunnels.delete
method.
DELETE https://compute.googleapis.com/compute/v1/projects/[PROJECT_ID]/regions/[REGION]/vpnTunnels/[TUNNEL_NAME]
Recommended follow-up
After deleting a VPN tunnel, consider the following:
Review your firewall rules and delete the rules that you no longer need.
If the tunnel used Classic VPN policy-based routing or was a route-based VPN, review the routes in your Google Cloud network. Delete any static routes that you no longer need.
If you used the Cloud Console to delete the tunnel for a Classic VPN gateway, static routes that were automatically created should already be removed. If you used
gcloud
to remove the tunnel, or if you created custom static routes for it, delete those tunnels manually.If no more tunnels exist for the associated VPN gateway, you can delete the VPN gateway as well.
What's next
- Learn about the basic concepts of Cloud VPN
- Maintain VPN tunnels and gateways
- Set up different types of Cloud VPN
- View logs and monitoring metrics
- Get troubleshooting help