gcloud edge-cloud container vpn-connections create

NAME
gcloud edge-cloud container vpn-connections create - create a VPN connection between an Edge Container cluster and a VPC network
SYNOPSIS
gcloud edge-cloud container vpn-connections createVPN_CONNECTION--cluster=CLUSTER--vpc-network=VPC_NETWORK[--async][--high-availability][--labels=[KEY=VALUE,…]][--location=LOCATION][--nat-gateway-ip=NAT_GATEWAY_IP][--router=ROUTER][--vpc-project=VPC_PROJECT][GCLOUD_WIDE_FLAG]
DESCRIPTION
Creates a new VPN connection.
EXAMPLES
To create a connection called 'my-vpn-connection' between the VPC network'my-vpc' and the Edge Container cluster 'my-cluster' which is at regionus-central1, run:
gcloudedge-cloudcontainervpn-connectionscreatemy-vpn-connection--location=us-central1--vpc-network='my-vpc'--cluster='my-cluster'

Here VPC network and cluster should be under the same project.

POSITIONAL ARGUMENTS
Vpn connection resource - VPN connection to create. This represents a Cloudresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.

To set theproject attribute:

  • provide the argumentvpn_connection on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argumentvpn_connection on the command line with afully specified name;
  • provide the argument--location on the command line;
  • set the propertyedge_container/location.

This must be specified.

VPN_CONNECTION
ID of the vpn connection or fully qualified identifier for the vpn connection.

To set thevpn_connection attribute:

  • provide the argumentvpn_connection on the command line.
REQUIRED FLAGS
Cluster resource - The name of the cluster to be connected under currentproject. This represents a Cloud resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argument--cluster on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argument--cluster on the command line with a fullyspecified name;
  • provide the argument--location on the command line;
  • set the propertyedge_container/location.

This must be specified.

--cluster=CLUSTER
ID of the cluster or fully qualified identifier for the cluster.

To set thecluster attribute:

  • provide the argument--cluster on the command line.
--vpc-network=VPC_NETWORK
The name of the VPC network to be connected. By default it is assumed to beunder the same project as cluster. If this VPC network is under a differentproject,vpc-project is required.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--high-availability
Enables high availability on cluster side. This creates an additional VPNendpoint in cluster. Multiple Nodes/NodePools are required to enable thisfeature.
--labels=[KEY=VALUE,…]
List of label KEY=VALUE pairs to add.

Keys must start with a lowercase character and contain only hyphens(-), underscores (_), lowercase characters, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers.

--location=LOCATION
For resources [cluster, vpn_connection], provides fallback value for resourcelocation attribute. When the resource's full URI path is not provided, locationwill fallback to this flag value.
--nat-gateway-ip=NAT_GATEWAY_IP
The NAT gateway IP for the gateway floating IPs. Required if cluster sits behindNAT.
--router=ROUTER
Name of the Cloud Router to use when creating the VPN connection. This CloudRouter must be in the same region as the cluster and connected to the providedVPC network. If not provided, a service-managed Cloud Router will either becreated or reused to create the VPN connection.
--vpc-project=VPC_PROJECT
The project of the VPC network. Required if the project of VPC network differsfrom the project of the cluster.
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.

API REFERENCE
This command uses theedgecontainer/v1 API. The full documentationfor this API can be found at:https://cloud.google.com/edge-cloud
NOTES
This variant is also available:
gcloudalphaedge-cloudcontainervpn-connectionscreate

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-07-15 UTC.