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, see Configuring the Peer gateway.
Permissions required for this task
To perform this task, you must have been granted the following permissions or the following IAM roles.
To delete an existing external peer VPN gateway, do the following:
- Go to the VPN page in the Google Cloud Console.
Go to the VPN page
- Find the row containing the Peer gateway name you want to delete.
- Under In use by VPN tunnels, click the name of the tunnel to delete.
- On the VPN tunnel details screen, click the Delete button at the top of the screen.
- On the VPN tunnels screen, wait for the tunnel to be deleted.
- Click the Peer VPN Gateways tab.
- Under Peer gateway name, find the row containing the gateway you want to delete.
- In that row, click the trash icon at the far right to delete the gateway.
- Click Delete in the confirmation dialog box.
- To confirm that the gateway has been deleted, click the Refresh button at the top of the screen.
In the following commands, replace
PROJECT_ID with the ID of your
Identify the name of the external peer VPN gateway you want to delete. You can list all VPN gateways with the following command. Once you identify the VPN gateway, replace
NAMEwith the external peer VPN gateway's name in the following steps.
gcloud compute external-vpn-gateways list --project PROJECT_ID
Determine if the VPN gateway has any VPN tunnels that need to be removed. To list all tunnels associated with a VPN gateway, use the following command:
gcloud compute vpn-gateways describe NAME \ --project PROJECT_ID \ --format='flattened(tunnels)'
Delete the external VPN gateway.
gcloud compute external-vpn-gateways delete NAME \ --project PROJECT_ID
To delete tunnels first, make a DELETE request with the
Make a DELETE request with the
- Learn about the basic concepts of Cloud VPN
- Maintain VPN tunnels and gateways
- View logs and monitoring metrics
- Get troubleshooting help