Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit den folgenden Verfahren können Sie eine externe Peer-VPN-Gateway-Ressource eines HA VPN-Gateways löschen. Diese Ressource stellt Ihr physisches oder softwarebasiertes Gateway in Google Clouddar.
Ermitteln Sie die Zeile, die den Namen des Peer-Gateways enthält, das gelöscht werden soll.
Klicken Sie unter Von VPN-Tunneln verwendet auf den Namen des Tunnels, den Sie löschen möchten.
Klicken Sie oben auf der Seite Details zum VPN-Tunnel auf Löschen.
Warten Sie auf der Seite VPN-Tunnel, bis der Tunnel gelöscht wurde.
Klicken Sie auf den Tab Peer-VPN-Gateways.
Ermitteln Sie unter Name des Peer-Gateways die Zeile mit dem Gateway, das Sie löschen möchten.
Klicken Sie in dieser Zeile auf more_vertAktionen und wählen Sie Löschen aus, um das Gateway zu löschen.
Klicken Sie im Bestätigungsdialogfeld auf Löschen.
Klicken Sie oben auf der Seite auf refreshAktualisieren, um zu prüfen, ob das Gateway gelöscht wurde.
gcloud
Ersetzen Sie in den aufgeführten Befehlen Folgendes:
PROJECT_ID: die Projekt-ID
EXTERNAL_GATEWAY_NAME: der Name Ihres externen Peer-VPN-Gateways
So löschen Sie das Gateway:
Ermitteln Sie den Namen des externen Peer-VPN-Gateways, das Sie löschen möchten. Diese Information wird in späteren Schritten benötigt. Um alle VPN-Gateways aufzulisten, führen Sie den folgenden Befehl aus:
gcloud compute external-vpn-gateways list
--project=PROJECT_ID
Ermitteln Sie, ob das VPN-Gateway VPN-Tunnel hat, die gelöscht werden müssen.
Um alle mit dem Gateway verknüpften Tunnel aufzulisten, führen Sie den folgenden Befehl aus:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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)."]]