gcloud alpha compute vpn-gateways create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha compute vpn-gateways create - create a new Compute Engine Highly Available VPN gateway
- SYNOPSIS
gcloud alpha compute vpn-gateways createNAME--network=NETWORK[--description=DESCRIPTION][--gateway-ip-version=GATEWAY_IP_VERSION][--interconnect-attachments=[INTERCONNECT_ATTACHMENTS,…]][--region=REGION][--resource-manager-tags=[KEY=VALUE,…]][--stack-type=STACK_TYPE][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)gcloud alpha compute vpn-gateways createcreates a new Highly Available VPN 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:
gcloudalphacomputevpn-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_VERSIONmust 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-zone2associates 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 the
property:compute/regiongcloudconfigsetcompute/regionREGIONA list of regions can be fetched by running:
gcloudcomputeregionslistTo unset the property, run:
gcloudconfigunsetcompute/regionAlternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION --resource-manager-tags=[KEY=VALUE,…]- A comma-separated list of Resource Manager tags to apply to the VPN gateway.
--stack-type=STACK_TYPE- The stack type of the protocol(s) enabled on this VPN gateway. If not provided,
IPV4_ONLYwill be used.STACK_TYPEmust 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 helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudcomputevpn-gatewayscreategcloudbetacomputevpn-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-08-19 UTC.