gcloud_beta_compute_addresses_create (1)
NAME
- gcloud beta compute addresses create - reserve IP addresses
SYNOPSIS
-
gcloud beta compute addresses create [NAME ...] [--description=DESCRIPTION] [--network=NETWORK] [--network-tier=NETWORK_TIER] [--prefix-length=PREFIX_LENGTH] [--purpose=PURPOSE] [--subnet=SUBNET] [--addresses=ADDRESS,[ADDRESS,...] | --ip-version=IP_VERSION] [--global | --region=REGION] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) gcloud beta compute addresses create is used to reserve one
POSITIONAL ARGUMENTS
-
- [NAME ...]
-
Names of the addresses to create.
FLAGS
-
- --description=DESCRIPTION
-
An optional textual description for the addresses.
- --network=NETWORK
-
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.
- --network-tier=NETWORK_TIER
-
The network tier to assign to the reserved IP addresses.
NETWORK_TIER must be one of: PREMIUM, STANDARD. The
default value is PREMIUM.
- --prefix-length=PREFIX_LENGTH
-
The prefix length of the IP range. It must be a value between 8 and 30
inclusive. If not present, it means the address field is a single IP address.
This field is not applicable to external addresses.
- --purpose=PURPOSE
-
The purpose of the address resource. This field is not applicable to external
addresses. PURPOSE must be one of: VPC_PEERING, GCE_ENDPOINT.
- --subnet=SUBNET
-
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.
-
At most one of these may be specified:
-
- --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 beta 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, server-generated names will be assigned to the IP addresses.
-
$ gcloud beta compute addresses create ADDRESS-1 ADDRESS-2 \
- --ip-version=IP_VERSION
-
The version of the IP address to be allocated and reserved if --addresses is
not used. The default is IPv4. IP_VERSION must be one of: IPV4,
IPV6.
-
-
At most one of these may be specified:
-
- --global
-
If set, the addresses are global.
- --region=REGION
-
Region of the addresses to create. Overrides the default compute/region
property value for this command invocation.
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To reserve three IP addresses in the 'us-central1' region, run:
-
$ gcloud beta 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 beta 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.
To reserve an IP address from the subnet 'default' in the 'us-central1' region, run:
-
$ gcloud beta compute addresses create SUBNET-ADDRESS-1 \
--region us-central1 --subnet default
To reserve an IP range 10.110.0.0/16 from the network 'default' for VPC_PEERING, run:
-
$ gcloud beta compute addresses create IP-RANGE-1 --global \
--addresses 10.110.0.0 --prefix-length 16 --purpose VPC_PEERING --network default
To reserve any IP range with prefix length 16 from the network 'default' for VPC_PEERING, run:
-
$ gcloud beta compute addresses create IP-RANGE-1 --global \
--prefix-length 16 --purpose VPC_PEERING --network default
NOTES
This command is currently in BETA and may change without notice. These variants are also available:
- $ gcloud compute addresses create $ gcloud alpha compute addresses create