GCLOUD COMPUTE ADDRESSES CREATE(1) GCLOUD COMPUTE ADDRESSES CREATE(1)NAMEgcloud_compute_addresses_create - reserve IP addresses
SYNOPSIS
gcloud compute addresses create [NAME ...] [--addresses ADDRESS
[ADDRESS ...]] [--description DESCRIPTION] [--format FORMAT]
[--help] [--project PROJECT_ID] [--quiet, -q] [--global |
--region REGION] [-h]
DESCRIPTION
gcloud compute addresses create 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.
POSITIONAL ARGUMENTS
[NAME ...]
The names to assign to the reserved IP addresses.
FLAGS--addresses ADDRESS [ADDRESS ...]
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,
$ gcloud compute addresses create ADDRESS-1 ADDRESS-2 \
--addresses 162.222.181.197 162.222.181.198 --region us-central1
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,
randomly-generated names will be assigned to the IP addresses.
--description DESCRIPTION
An optional textual description for the addresses.
--global
If provided, it is assumed the addresses are global.
--region REGION
The region of the address to operate on. If not specified, you will
be prompted to select a region.
To avoid prompting when this flag is omitted, you can set the
compute/region property:
$ gcloud config set compute/region REGION
A list of regions can fetched by running:
$ gcloud compute regions list
To unset the property, run:
$ gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
CLOUDSDK_COMPUTE_REGION.
GLOBAL FLAGS
--format FORMAT
Specify a format for printed output. By default, a command-specific
human-friendly output format is used. Setting this flag to one of
the available options will serialize the result of the command in
the chosen format and print it to stdout. Supported formats are:
json, text, yaml.
--help
Display detailed help.
--project PROJECT_ID
The Google Cloud Platform project name to use for this invocation.
If omitted then the current project is assumed.
--quiet, -q
Disable all interactive prompts when running gcloud commands. If
input is required, defaults will be used, or an error will be
raised.
-h
Print a summary help and exit.
EXAMPLES
To reserve three IP addresses in the us-central1 region, run:
$ gcloud compute addresses create ADDRESS-1 ADDRESS-2 ADDRESS-3 \
--region us-central1
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:
$ gcloud compute addresses create --addresses 162.222.181.198 \
23.251.146.189 --region us-central1
In the above invocation, the two addresses will be assigned random
names.
NOTES
This command is in the Google Cloud SDK compute component. See
installing components if it is not installed.
GCLOUD COMPUTE ADDRESSES CREATE(1)