gcloud_beta_compute_routes_create (1)
NAME
- gcloud beta compute routes create - create a new route
SYNOPSIS
-
gcloud beta compute routes create NAME --destination-range=DESTINATION_RANGE (--next-hop-address=NEXT_HOP_ADDRESS | --next-hop-gateway=NEXT_HOP_GATEWAY | --next-hop-ilb=NEXT_HOP_ILB | --next-hop-instance=NEXT_HOP_INSTANCE | --next-hop-vpn-tunnel=NEXT_HOP_VPN_TUNNEL) [--description=DESCRIPTION] [--network=NETWORK; default="default"] [--next-hop-ilb-region=NEXT_HOP_ILB_REGION] [--next-hop-instance-zone=NEXT_HOP_INSTANCE_ZONE] [--next-hop-vpn-tunnel-region=NEXT_HOP_VPN_TUNNEL_REGION] [--priority=PRIORITY; default=1000] [--tags=TAG,[TAG,...]] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) gcloud beta compute routes create is used to create routes. A
Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones (see --destination-range). If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer 3 and 4 packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by --next-hop-address, --next-hop-instance, --next-hop-vpn-tunnel, --next-hop-gateway, or --next-hop-ilb of the winning route. Packets that do not match any route in the sending virtual machine routing table will be dropped.
Exactly one of --next-hop-address, --next-hop-gateway, --next-hop-vpn-tunnel, --next-hop-instance, or --next-hop-ilb must be provided with this command.
POSITIONAL ARGUMENTS
-
- NAME
-
Name of the route to create.
REQUIRED FLAGS
-
- --destination-range=DESTINATION_RANGE
-
The destination range of outgoing packets that the route will apply to. To match
all traffic, use ``0.0.0.0/0''.
-
Exactly one of these must be specified:
-
- --next-hop-address=NEXT_HOP_ADDRESS
-
Specifies the IP address of an instance that should handle matching packets. The
instance must have IP forwarding enabled (i.e., include
--can-ip-forward when creating the instance using gcloud
compute instances create)
- --next-hop-gateway=NEXT_HOP_GATEWAY
-
Specifies the gateway that should handle matching packets. Currently, the only
acceptable value is default-internet-gateway which is a gateway operated
by Google Compute Engine.
- --next-hop-ilb=NEXT_HOP_ILB
-
The target forwarding rule that will receive forwarded traffic. This can only be
used when the destination_range is a public (non-RFC 1918) IP CIDR range.
Requires --load-balancing-scheme=INTERNAL on the corresponding forwarding
rule.
- --next-hop-instance=NEXT_HOP_INSTANCE
-
Specifies the name of an instance that should handle traffic matching this
route. When this flag is specified, the zone of the instance must be specified
using --next-hop-instance-zone.
- --next-hop-vpn-tunnel=NEXT_HOP_VPN_TUNNEL
-
The target VPN tunnel that will receive forwarded traffic.
-
OPTIONAL FLAGS
-
- --description=DESCRIPTION
-
An optional, textual description for the route.
- --network=NETWORK; default="default"
-
Specifies the network to which the route will be applied.
- --next-hop-ilb-region=NEXT_HOP_ILB_REGION
-
The region of the next hop forwarding rule. If not specified, you may 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 be 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.
- --next-hop-instance-zone=NEXT_HOP_INSTANCE_ZONE
-
The zone of the next hop instance. If not specified, you may be prompted to
select a zone. gcloud will attempt to identify the zone by searching for
resources in your project. If the zone cannot be determined, you will then be
prompted with all Google Cloud Platform zones.
To avoid prompting when this flag is omitted, you can set the compute/zone property:
- $ gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
- $ gcloud compute zones list
To unset the property, run:
- $ gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable CLOUDSDK_COMPUTE_ZONE.
- --next-hop-vpn-tunnel-region=NEXT_HOP_VPN_TUNNEL_REGION
-
The region of the next hop vpn tunnel. If not specified, you may 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 be 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.
- --priority=PRIORITY; default=1000
-
Specifies the priority of this route relative to other routes with the same
specificity. The lower the value, the higher the priority.
- --tags=TAG,[TAG,...]
-
Identifies the set of instances that this route will apply to. If no tags are
provided, the route will apply to all instances in the network.
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.
NOTES
This command is currently in BETA and may change without notice. These variants are also available:
- $ gcloud compute routes create $ gcloud alpha compute routes create