File: //snap/google-cloud-cli/396/help/man/man1/gcloud_compute_networks_peerings_create.1
.TH "GCLOUD_COMPUTE_NETWORKS_PEERINGS_CREATE" 1
.SH "NAME"
.HP
gcloud compute networks peerings create \- create a Compute Engine network peering
.SH "SYNOPSIS"
.HP
\f5gcloud compute networks peerings create\fR \fINAME\fR \fB\-\-network\fR=\fINETWORK\fR \fB\-\-peer\-network\fR=\fIPEER_NETWORK\fR [\fB\-\-async\fR] [\fB\-\-auto\-create\-routes\fR] [\fB\-\-export\-custom\-routes\fR] [\fB\-\-export\-subnet\-routes\-with\-public\-ip\fR] [\fB\-\-import\-custom\-routes\fR] [\fB\-\-import\-subnet\-routes\-with\-public\-ip\fR] [\fB\-\-peer\-project\fR=\fIPEER_PROJECT\fR] [\fB\-\-stack\-type\fR=\fISTACK_TYPE\fR] [\fB\-\-update\-strategy\fR=\fIUPDATE_STRATEGY\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fBgcloud compute networks peerings create\fR is used to create peerings between
virtual networks. Each side of a peering association is set up independently.
Peering will be active only when the configuration from both sides matches.
.SH "EXAMPLES"
To create a network peering with the name 'peering\-name' between the network
\'local\-network' and the network 'peer\-network' which exports and imports
custom routes and subnet routes with public IPs, run:
.RS 2m
$ gcloud compute networks peerings create peering\-name \e
\-\-network=local\-network \-\-peer\-network=peer\-network \e
\-\-export\-custom\-routes \-\-import\-custom\-routes \e
\-\-export\-subnet\-routes\-with\-public\-ip \e
\-\-import\-subnet\-routes\-with\-public\-ip
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fINAME\fR
The name of the peering.
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-network\fR=\fINETWORK\fR
The name of the network in the current project to be peered with the peer
network.
.TP 2m
\fB\-\-peer\-network\fR=\fIPEER_NETWORK\fR
The name of the network to be peered with the current network.
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
.TP 2m
\fB\-\-auto\-create\-routes\fR
(DEPRECATED) If set, will automatically create routes for the network peering.
Flag auto\-create\-routes is deprecated. Peer network subnet routes are always
created in a network when peered.
Flag \-\-auto\-create\-routes is deprecated and will be removed in a future
release.
.TP 2m
\fB\-\-export\-custom\-routes\fR
If set, the network will export custom routes to peer network. Use
\-\-no\-export\-custom\-routes to disable it.
.TP 2m
\fB\-\-export\-subnet\-routes\-with\-public\-ip\fR
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.
.TP 2m
\fB\-\-import\-custom\-routes\fR
If set, the network will import custom routes from peer network. Use
\-\-no\-import\-custom\-routes to disable it.
.TP 2m
\fB\-\-import\-subnet\-routes\-with\-public\-ip\fR
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.
.TP 2m
\fB\-\-peer\-project\fR=\fIPEER_PROJECT\fR
The name of the project for the peer network. If not specified, defaults to
current project.
.TP 2m
\fB\-\-stack\-type\fR=\fISTACK_TYPE\fR
Stack type of the peering. If not specified, defaults to IPV4_ONLY.
STACK_TYPE must be one of:
.RS 2m
IPV4_ONLY
Only IPv4 traffic and routes will be exchanged across this peering.
.RE
.RS 2m
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.
.RE
.TP 2m
\fB\-\-update\-strategy\fR=\fIUPDATE_STRATEGY\fR
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.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
These variants are also available:
.RS 2m
$ gcloud alpha compute networks peerings create
.RE
.RS 2m
$ gcloud beta compute networks peerings create
.RE