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 Configuring 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.
Permissions required for this task
To perform this task, you must have been granted the following permissions or the following IAM roles.
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, clickDelete on the far right.
In the confirmation dialog box, click Delete.
To confirm that the gateway has been deleted, at the top of the page, clickRefresh.
In the following commands, replace the following:
PROJECT_ID: the ID of your project
EXTERNAL_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
To delete tunnels first, make a DELETE request by using the
Make a DELETE request by using the
- To view Cloud Logging and Monitoring information, see Viewing 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.