gcloud compute vpn-gateways create

NAME
gcloud compute vpn-gateways create - create a new Compute Engine Highly Available VPN gateway
SYNOPSIS
gcloud compute vpn-gateways createNAME--network=NETWORK[--description=DESCRIPTION][--gateway-ip-version=GATEWAY_IP_VERSION][--interconnect-attachments=[INTERCONNECT_ATTACHMENTS,…]][--region=REGION][--stack-type=STACK_TYPE][GCLOUD_WIDE_FLAG]
DESCRIPTION
gcloud compute vpn-gateways create creates a new Highly AvailableVPN gateway.

Highly Available VPN Gateway provides a means to create a VPN solution with ahigher availability SLA compared to Classic Target VPN Gateway. Highly AvailableVPN gateways are simply referred to as VPN gateways in the API documentation andgcloud commands. A VPN Gateway can reference one or more VPN tunnels thatconnect it to external VPN gateways or Cloud VPN Gateways.

EXAMPLES
To create a VPN gateway, run:
gcloudcomputevpn-gatewayscreatemy-vpn-gateway--region=us-central1--network=default
POSITIONAL ARGUMENTS
NAME
Name of the VPN Gateway to create.
REQUIRED FLAGS
--network=NETWORK
A reference to a network to which the VPN gateway is attached.
OPTIONAL FLAGS
--description=DESCRIPTION
An optional, textual description for the VPN gateway.
--gateway-ip-version=GATEWAY_IP_VERSION
IP version of the HA VPN gateway. You must specify either IPv4 or IPv6. If youdo not specify this field, every HA VPN gateway interface will be configuredwith an IPv4 address.GATEWAY_IP_VERSION must be one of:
IPV4
Every HA-VPN gateway interface is configured with an IPv4 address.
IPV6
Every HA-VPN gateway interface is configured with an IPv6 address.
--interconnect-attachments=[INTERCONNECT_ATTACHMENTS,…]
Names of interconnect attachments (VLAN attachments) associated with the VPNgateway interfaces. You must specify this field when using a VPN gateway for HAVPN over Cloud Interconnect. Otherwise, this field is optional.

For example,--interconnect-attachmentsattachment-a-zone1,attachment-a-zone2 associates VPN gateway withattachment from zone1 on interface 0 and with attachment from zone2 on interface1.

--region=REGION
Region of the VPN Gateway to create. If not specified, you might be prompted toselect a region (interactive mode only).

To avoid prompting when this flag is omitted, you can set thecompute/region property:

gcloudconfigsetcompute/regionREGION

A list of regions can be fetched by running:

gcloudcomputeregionslist

To unset the property, run:

gcloudconfigunsetcompute/region

Alternatively, the region can be stored in the environment variableCLOUDSDK_COMPUTE_REGION.

--stack-type=STACK_TYPE
The stack type of the protocol(s) enabled on this VPN gateway. If not provided,IPV4_ONLY will be used.STACK_TYPE must beone of:
IPV4_IPV6
Both IPv4 and IPv6 protocols are enabled on this VPN gateway.
IPV4_ONLY
Only IPv4 protocol is enabled on this VPN gateway.
IPV6_ONLY
Only IPv6 protocol is enabled on this VPN gateway.
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$gcloud help for details.

NOTES
These variants are also available:
gcloudalphacomputevpn-gatewayscreate
gcloudbetacomputevpn-gatewayscreate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.