Borrar una puerta de enlace de VPN de intercambio de par externa
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Los siguientes procedimientos te permiten borrar un recurso de puerta de enlace de VPN de intercambio de tráfico externa para una puerta de enlace de VPN con alta disponibilidad. Este recurso representa tu puerta de enlace física o basada en software en Google Cloud.
Busca la fila que contiene el Nombre de la puerta de enlace de intercambio de tráfico que deseas borrar.
En En uso por túneles VPN, haz clic en el nombre del túnel que deseas borrar.
En la página Detalles del túnel VPN, en la parte superior de la página, haz clic en Borrar.
En la pantalla Túneles VPN, espera a que se borre el túnel.
Haz clic en la pestaña Puertas de enlace de VPN de intercambio de tráfico.
En Nombre de puerta de enlace de intercambio de tráfico, busca la fila que contiene la puerta de enlace que deseas borrar.
En esa fila, para borrar la puerta de enlace, haz clic en more_vertAcciones y, luego, selecciona Borrar.
En el cuadro de diálogo de confirmación, haz clic en Borrar.
Para confirmar que se borró la puerta de enlace, haz clic en refreshActualizar en la parte superior de la página.
gcloud
En los siguientes comandos, reemplaza lo siguiente:
PROJECT_ID: Es el ID de tu proyecto.
EXTERNAL_GATEWAY_NAME: Es el nombre de tu puerta de enlace de VPN de intercambio de tráfico externa.
Para borrar la puerta de enlace, sigue estos pasos:
Identifica el nombre de la puerta de enlace de VPN de intercambio de tráfico externa que deseas borrar y, luego, usa esa información en los pasos posteriores. Para enumerar todas las puertas de enlace de VPN, ejecuta el siguiente comando:
gcloud compute external-vpn-gateways list
--project=PROJECT_ID
Determina si la puerta de enlace de VPN tiene algún túnel VPN que deba quitarse.
Para enumerar todos los túneles asociados con la puerta de enlace, ejecuta el siguiente comando:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-08 (UTC)"],[],[],null,["# Delete an external peer VPN gateway\n\nThe following procedures enable you to delete an external peer VPN gateway\nresource for an HA VPN gateway. This resource represents\nyour physical or software-based gateway in Google Cloud.\n\nTo add an external peer VPN gateway resource, see\n[Configure the peer VPN gateway](/network-connectivity/docs/vpn/how-to/configuring-peer-gateway).\n\nBefore removing an external peer VPN gateway resource,\n[delete all associated VPN tunnels](/network-connectivity/docs/vpn/how-to/deleting-a-tunnel).\n\nTo delete an external peer VPN gateway resource, complete the following steps.\n\n#### Permissions required for this task\n\nTo perform this task, you must have been granted the following permissions\n*or* the following IAM roles.\n\n**Permissions**\n\n- `compute.vpnGateways.get`\n- `compute.vpnGateways.list`\n- `compute.externalVpnGateways.get`\n- `compute.externalVpnGateways.list`\n- `compute.vpnGateways.create`\n- `compute.vpnGateways.delete`\n- `compute.vpnGateways.get`\n- `compute.vpnGateways.list`\n- `compute.vpnGateways.use`\n- `compute.vpnGateways.setLabels`\n- `compute.externalVpnGateways.create`\n- `compute.externalVpnGateways.delete`\n- `compute.externalVpnGateways.get`\n- `compute.externalVpnGateways.list`\n- `compute.externalVpnGateways.use`\n- `compute.externalVpnGateways.setLabels`\n\n**Roles**\n\n- `roles/compute.networkAdmin` \n\n### Console\n\n1. In the Google Cloud console, go to the **VPN** page.\n\n [Go to VPN](https://console.cloud.google.com/hybrid/vpn/list?tab=peerGateways)\n2. Find the row that contains the **Peer gateway name** that you want to\n delete.\n\n3. Under **In use by VPN tunnels**, click the name of the tunnel to delete.\n\n4. On the **VPN tunnel details** page, at the top of the page, click\n **Delete**.\n\n5. On the **VPN tunnels** page, wait for the tunnel to be deleted.\n\n6. Click the **Peer VPN gateways** tab.\n\n7. Under **Peer gateway name**, find the row that contains the gateway that\n you want to delete.\n\n8. In that row, to delete the gateway, click\n more_vert**Actions** , then select\n **Delete**.\n\n9. In the confirmation dialog box, click **Delete**.\n\n10. To confirm that the gateway has been deleted, at the top of the page,\n click\n refresh**Refresh**.\n\n### gcloud\n\nIn the following commands, replace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your project\n- \u003cvar translate=\"no\"\u003eEXTERNAL_GATEWAY_NAME\u003c/var\u003e: the name of your external peer VPN gateway\n\nTo delete the gateway, follow these steps:\n\n1. Identify the name of the external peer VPN gateway that you want\n to delete, and then use that information in later steps. To list all VPN\n gateways, run the following command:\n\n ```\n gcloud compute external-vpn-gateways list\n --project=PROJECT_ID\n ```\n2. Determine if the VPN gateway has any VPN tunnels that need to be deleted.\n To list all tunnels associated with the gateway, run the following\n command:\n\n ```\n gcloud compute vpn-gateways describe EXTERNAL_GATEWAY_NAME \\\n --project=PROJECT_ID \\\n --format='flattened(tunnels)'\n ```\n3. [Delete each existing tunnel](/network-connectivity/docs/vpn/how-to/deleting-a-tunnel).\n\n4. Delete the external peer VPN gateway.\n\n ```\n gcloud compute external-vpn-gateways delete EXTERNAL_GATEWAY_NAME \\\n --project=PROJECT_ID\n ```\n\n### API\n\nTo delete tunnels first, make a DELETE request by using the\n[`vpnTunnels.delete`](/compute/docs/reference/rest/v1/externalVpnGateways/delete)\nmethod: \n\n```\nDELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/vpnTunnels/TUNNEL_NAME\n```\n\nMake a DELETE request by using the\n[`externalVpnGateways.delete`](/compute/docs/reference/rest/v1/externalVpnGateways/delete)\nmethod: \n\n```\nDELETE https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/externalVpnGateways/EXTERNAL_GATEWAY_NAME\n```\n\nWhat's next\n-----------\n\n- To view Cloud Logging and Monitoring information, see [View logs and metrics](/network-connectivity/docs/vpn/how-to/viewing-logs-metrics).\n- To use high-availability and high-throughput scenarios or multiple subnet scenarios, see [Advanced configurations](/network-connectivity/docs/vpn/concepts/advanced).\n- To help you solve common issues that you might encounter when using Cloud VPN, see [Troubleshooting](/network-connectivity/docs/vpn/support/troubleshooting)."]]