gcloud edge-cloud container vpn-connections create Stay organized with collections Save and categorize content based on your preferences.
- 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 the
projectattribute:- provide the argument
vpn_connectionon the command line with afully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
To set the
locationattribute:- provide the argument
vpn_connectionon the command line with afully specified name; - provide the argument
--locationon the command line; - set the property
edge_container/location.
This must be specified.
VPN_CONNECTION- ID of the vpn connection or fully qualified identifier for the vpn connection.
To set the
vpn_connectionattribute:- provide the argument
vpn_connectionon the command line.
- provide the argument
- provide the argument
- 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.
- 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 the
projectattribute:- provide the argument
--clusteron the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
To set the
locationattribute:- provide the argument
--clusteron the command line with a fullyspecified name; - provide the argument
--locationon the command line; - set the property
edge_container/location.
This must be specified.
--cluster=CLUSTER- ID of the cluster or fully qualified identifier for the cluster.
To set the
clusterattribute:- provide the argument
--clusteron the command line.
- provide the argument
- provide the argument
--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-projectis required.
- 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.
- 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 helpfor details. - API REFERENCE
- This command uses the
edgecontainer/v1API. 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.