The following procedures enable you to delete an external peer VPN gateway resource for an HA VPN gateway. This resource represents your physical or software-based gateway in Google Cloud.
To add an external peer VPN gateway resource, see Configure the peer VPN gateway.
Before removing an external peer VPN gateway resource, delete all associated VPN tunnels.
To delete an external peer VPN gateway resource, complete the following steps.
Console
In the Google Cloud console, go to the VPN page.
Find the row that contains the Peer gateway name that you want to delete.
Under In use by VPN tunnels, click the name of the tunnel to delete.
On the VPN tunnel details page, at the top of the page, click Delete.
On the VPN tunnels page, wait for the tunnel to be deleted.
Click the Peer VPN gateways tab.
Under Peer gateway name, find the row that contains the gateway that you want to delete.
In that row, to delete the gateway, click
Actions, then select Delete.In the confirmation dialog box, click Delete.
To confirm that the gateway has been deleted, at the top of the page, click
Refresh.
gcloud
In the following commands, replace the following:
PROJECT_ID
: the ID of your projectEXTERNAL_GATEWAY_NAME
: the name of your external peer VPN gateway
To delete the gateway, follow these steps:
Identify the name of the external peer VPN gateway that you want to delete, and then use that information in later steps. To list all VPN gateways, run the following command:
gcloud compute external-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 following command:
gcloud compute vpn-gateways describe EXTERNAL_GATEWAY_NAME \ --project=PROJECT_ID \ --format='flattened(tunnels)'
Delete the external peer VPN gateway.
gcloud compute external-vpn-gateways delete EXTERNAL_GATEWAY_NAME \ --project=PROJECT_ID
API
To delete tunnels first, make a DELETE request by using the
vpnTunnels.delete
method:
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/vpnTunnels/TUNNEL_NAME
Make a DELETE request by using the
externalVpnGateways.delete
method:
DELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/externalVpnGateways/EXTERNAL_GATEWAY_NAME
What's next
- To view Cloud Logging and Monitoring information, see View logs and metrics.
- To use high-availability and high-throughput scenarios or multiple subnet scenarios, see Advanced configurations.
- To help you solve common issues that you might encounter when using Cloud VPN, see Troubleshooting.