File: //snap/google-cloud-cli/394/help/man/man1/gcloud_compute_addresses_create.1
.TH "GCLOUD_COMPUTE_ADDRESSES_CREATE" 1
.SH "NAME"
.HP
gcloud compute addresses create \- reserve IP addresses
.SH "SYNOPSIS"
.HP
\f5gcloud compute addresses create\fR [\fINAME\fR\ ...] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-endpoint\-type\fR=\fIENDPOINT_TYPE\fR] [\fB\-\-network\fR=\fINETWORK\fR] [\fB\-\-network\-tier\fR=\fINETWORK_TIER\fR] [\fB\-\-prefix\-length\fR=\fIPREFIX_LENGTH\fR] [\fB\-\-purpose\fR=\fIPURPOSE\fR] [\fB\-\-subnet\fR=\fISUBNET\fR] [\fB\-\-addresses\fR=\fIADDRESS\fR,[\fIADDRESS\fR,...]\ |\ \fB\-\-ip\-version\fR=\fIIP_VERSION\fR] [\fB\-\-global\fR\ |\ \fB\-\-region\fR=\fIREGION\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fBgcloud compute addresses create\fR is used to reserve one or more IP
addresses. Once an IP address is reserved, it will be associated with the
project until it is released using 'gcloud compute addresses delete'. Ephemeral
IP addresses that are in use by resources in the project can be reserved using
the '\-\-addresses' flag.
.SH "EXAMPLES"
To reserve three IP addresses in the 'us\-central1' region, run:
.RS 2m
$ gcloud compute addresses create address\-1 address\-2 address\-3 \e
\-\-region=us\-central1
.RE
To reserve ephemeral IP addresses '162.222.181.198' and '23.251.146.189' which
are being used by virtual machine instances in the 'us\-central1' region, run:
.RS 2m
$ gcloud compute addresses create \e
\-\-addresses=162.222.181.198,23.251.146.189 \-\-region=us\-central1
.RE
In the above invocation, the two addresses will be assigned random names.
To reserve an IP address named subnet\-address\-1 from the subnet 'default' in
the 'us\-central1' region, run:
.RS 2m
$ gcloud compute addresses create subnet\-address\-1 \e
\-\-region=us\-central1 \-\-subnet=default
.RE
To reserve an IP range '10.110.0.0/16' from the network 'default' for
\'VPC_PEERING', run:
.RS 2m
$ gcloud compute addresses create ip\-range\-1 \-\-global \e
\-\-addresses=10.110.0.0 \-\-prefix\-length=16 \e
\-\-purpose=VPC_PEERING \-\-network=default
.RE
To reserve any IP range with prefix length '16' from the network 'default' for
\'VPC_PEERING', run:
.RS 2m
$ gcloud compute addresses create ip\-range\-1 \-\-global \e
\-\-prefix\-length=16 \-\-purpose=VPC_PEERING \-\-network=default
.RE
To reserve an address from network 'default' for PRIVATE_SERVICE_CONNECT, run:
.RS 2m
$ gcloud compute addresses create psc\-address\-1 \-\-global \e
\-\-addresses=10.110.0.10 \-\-purpose=PRIVATE_SERVICE_CONNECT \e
\-\-network=default
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
[\fINAME\fR ...]
Names of the addresses to create.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
An optional textual description for the addresses.
.TP 2m
\fB\-\-endpoint\-type\fR=\fIENDPOINT_TYPE\fR
The endpoint type of the external IPv6 address to be reserved.
\fIENDPOINT_TYPE\fR must be one of: \fBVM\fR, \fBNETLB\fR.
.TP 2m
\fB\-\-network\fR=\fINETWORK\fR
If specified, the network resource in which the address(es) should be reserved.
This is only available for global internal address, which represents an internal
IP range reservation from within the network.
.TP 2m
\fB\-\-network\-tier\fR=\fINETWORK_TIER\fR
The network tier to assign to the reserved IP addresses.
\f5\fINETWORK_TIER\fR\fR must be one of: \f5PREMIUM\fR, \f5STANDARD\fR. The
default value is \f5PREMIUM\fR.
While regional external addresses (\f5\-\-region\fR specified, \f5\-\-subnet\fR
omitted) can use either \f5PREMIUM\fR or \f5STANDARD\fR, global external
addresses (\f5\-\-global\fR specified, \f5\-\-subnet\fR omitted) can only use
\f5PREMIUM\fR. Internal addresses can only use \f5PREMIUM\fR.
.TP 2m
\fB\-\-prefix\-length\fR=\fIPREFIX_LENGTH\fR
The prefix length of the IP range. If the address is an IPv4 address, it must be
a value between 8 and 30 inclusive. If the address is an IPv6 address, the only
allowed value is 96. If not present, it means the address field is a single IP
address.
This field is not applicable to external IPv4 addresses or global IPv6
addresses.
.TP 2m
\fB\-\-purpose\fR=\fIPURPOSE\fR
The purpose of the address resource. This field is not applicable to external
addresses. \fIPURPOSE\fR must be one of: \fBVPC_PEERING\fR,
\fBSHARED_LOADBALANCER_VIP\fR, \fBGCE_ENDPOINT\fR, \fBIPSEC_INTERCONNECT\fR,
\fBPRIVATE_SERVICE_CONNECT\fR.
.TP 2m
\fB\-\-subnet\fR=\fISUBNET\fR
If specified, the subnet name in which the address(es) should be reserved. The
subnet must be in the same region as the address.
The address will represent an internal IP reservation from within the subnet. If
\-\-address is specified, it must be within the subnet's IP range.
May not be specified with \-\-global.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-addresses\fR=\fIADDRESS\fR,[\fIADDRESS\fR,...]
Ephemeral IP addresses to promote to reserved status. Only addresses that are
being used by resources in the project can be promoted. When providing this
flag, a parallel list of names for the addresses can be provided. For example,
.RS 2m
$ gcloud compute addresses create ADDRESS\-1 ADDRESS\-2 \e
\-\-addresses 162.222.181.197,162.222.181.198 \e
\-\-region us\-central1
.RE
will result in 162.222.181.197 being reserved as 'ADDRESS\-1' and
162.222.181.198 as 'ADDRESS\-2'. If no names are given, server\-generated names
will be assigned to the IP addresses.
.TP 2m
\fB\-\-ip\-version\fR=\fIIP_VERSION\fR
Version of the IP address to be allocated and reserved. The default is IPV4.
IP version can only be specified for global addresses that are generated
automatically (i.e., along with the \f5\-\-global\fR flag, given
\f5\-\-addresses\fR is not specified) and if the \f5\-\-network\-tier\fR is
\f5PREMIUM\fR.
\fIIP_VERSION\fR must be one of: \fBIPV4\fR, \fBIPV6\fR.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-global\fR
If set, the addresses are global.
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Region of the addresses to create. Overrides the default \fBcompute/region\fR
property value for this command invocation.
.RE
.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 addresses create
.RE
.RS 2m
$ gcloud beta compute addresses create
.RE