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 project.
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 name with 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