- INFORMATION
-
gcloud preview compute networks peerings updateis not available in universe domainuniverse. - NAME
-
- gcloud preview compute networks peerings update - update a Compute Engine network peering
- SYNOPSIS
-
-
gcloud preview compute networks peerings updateNAME--network=NETWORK[--export-custom-routes] [--export-subnet-routes-with-public-ip] [--import-custom-routes] [--import-subnet-routes-with-public-ip] [--stack-type=STACK_TYPE] [--update-strategy=UPDATE_STRATEGY] [GCLOUD_WIDE_FLAG …]
-
- EXAMPLES
-
To update the peering named peering-name to both export and import custom
routes, run:
To update the peering named peering-name to both export and import subnet routes with public ip, run:gcloud preview compute networks peerings update peering-name --export-custom-routes --import-custom-routesgcloud preview compute networks peerings update peering-name --export-subnet-routes-with-public-ip --import-subnet-routes-with-public-ip - POSITIONAL ARGUMENTS
-
NAME- The name of the peering.
- REQUIRED FLAGS
-
--network=NETWORK- The name of the network in the current project to be peered with the peer network.
- OPTIONAL FLAGS
-
--export-custom-routes- If set, the network will export custom routes to peer network. Use --no-export-custom-routes to disable it.
--export-subnet-routes-with-public-ip- If set, the network will export subnet routes with addresses in the public IP ranges to peer network. Use --no-export-subnet-routes-with-public-ip to disable it.
--import-custom-routes- If set, the network will import custom routes from peer network. Use --no-import-custom-routes to disable it.
--import-subnet-routes-with-public-ip- If set, the network will import subnet routes with addresses in the public IP ranges from peer network. Use --no-import-subnet-routes-with-public-ip to disable it.
--stack-type=STACK_TYPE-
Stack type of the peering. If not specified, defaults to IPV4_ONLY.
STACK_TYPE must be one of:
IPV4_ONLY Only IPv4 traffic and routes will be exchanged across this peering.
IPV4_IPV6 IPv4 traffic and routes will be exchanged across this peering. IPv6 traffic and routes will be exchanged if the matching peering configuration also has stack_type set to IPV4_IPV6.
--update-strategy=UPDATE_STRATEGY-
Update strategy of the peering. If not specified, defaults to INDEPENDENT.
UPDATE_STRATEGY must be one of:
INDEPENDENT Updates and deletes to the peering connection can be performed by either network admin.
CONSENSUS Updates and deletes to the peering connection must be agreed upon by both network admins.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
-
This command is currently in DEVELOPER PREVIEW and may change without notice. If
this command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist. These variants are also available:
gcloud compute networks peerings updategcloud alpha compute networks peerings updategcloud beta compute networks peerings update
gcloud preview compute networks peerings update
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-04-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-14 UTC."],[],[]]