gcloud vmware private-connections create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud vmware private-connections create - create a Google Cloud Private Connection
- SYNOPSIS
gcloud vmware private-connections create(PRIVATE_CONNECTION:--location=LOCATION)--service-project=SERVICE_PROJECT--type=TYPE--vmware-engine-network=VMWARE_ENGINE_NETWORK[--async][--description=DESCRIPTION][--routing-mode=ROUTING_MODE][--service-network=SERVICE_NETWORK][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Creates a new private connection to connect VMware Engine Network to thespecified VPC network. This establishes private IP connectivity between the VPCnetwork and all the VMware Private Clouds attached to the VMware Engine Network.Private connection creation is considered finished when the connection is inACTIVE state. Check the progress of the private connection using
gcloud vmwareprivate-connections list. - EXAMPLES
- To create a Private Connection of type PRIVATE_SERVICE_ACCESS, first obtain theservice-project by listing vpc-peerings, run:
gcloudcomputenetworkspeeringslist--network=my-vpc--project=my-projectwhere my-vpc is the VPC on which a private service access connection is createdand project is the one in which the private connection will be created.
The response will be of this format:
NAME NETWORK PEER_PROJECT
servicenetworking-googleapis-com my-vpc td096d594ece09650-tp
The PEER_PROJECT field in the output of the command will provide the value forthe service-project required for creating the private connection.
To create a Private Connection called
my-private-connectionof typePRIVATE_SERVICE_ACCESSin projectmy-projectandregionus-west1with routing_modeREGIONALto connectservice networking VPC from projecttd096d594ece09650-tpto legacyVMware Engine Networkus-west1-default, run:gcloudvmwareprivate-connectionscreatemy-private-connection--location=us-west1--project=my-project--vmware-engine-network=us-west1-default--description="A short description for the new private connection"--routing-mode=REGIONAL--service-project=td096d594ece09650-tp--type=PRIVATE_SERVICE_ACCESSOr:
gcloudvmwareprivate-connectionscreatemy-private-connection--vmware-engine-network=us-west1-default--description="A short description for the new private connection"--routing-mode=REGIONAL--service-project=td096d594ece09650-tp--type=PRIVATE_SERVICE_ACCESSInthesecondexample,theprojectandlocationaretakenfromgcloudpropertiescore/projectandcompute/region,respectively.
To create a Private Connection called
my-private-connectionof typeTHIRD_PARTY_SERVICEin projectmy-projectand regionus-west1to connect VPCmy-service-networkfromprojecttd096d594ece09650-tpto legacy VMware Engine Networkus-west1-default, run:gcloudvmwareprivate-connectionscreatemy-private-connection--location=us-west1--project=my-project--vmware-engine-network=us-west1-default--description="A short description for the new private connection"--service-network=my-service-network--service-project=td096d594ece09650-tp--type=THIRD_PARTY_SERVICEOr:
gcloudvmwareprivate-connectionscreatemy-private-connection--vmware-engine-network=us-west1-default--description="A short description for the new private connection"--service-network=my-service-network--service-project=td096d594ece09650-tp--type=THIRD_PARTY_SERVICEIntheaboveexample,theprojectandlocationaretakenfromgcloudpropertiescore/projectandcompute/region,respectively.
If you try to create a private connection of type=THIRD_PARTY_SERVICE, and donot provide the service-network field, an error will be thrown with the message:
Missing required argument [--service-network]: For private connection of typeTHIRD_PARTY_SERVICE, service-network field is required
- POSITIONAL ARGUMENTS
- Private Connection resource - private_connection. The arguments in this groupcan be used to specify the attributes of this resource. (NOTE) Some attributesare not given arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
private_connectionon the command line with afully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
PRIVATE_CONNECTION- ID of the Private Connection or fully qualified identifier for the PrivateConnection.
To set the
private-connectionattribute:- provide the argument
private_connectionon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The resource name of the location.
To set the
locationattribute:- provide the argument
private_connectionon the command line with afully specified name; - provide the argument
--locationon the command line; - set the property
compute/region.
- provide the argument
- provide the argument
- Private Connection resource - private_connection. The arguments in this groupcan be used to specify the attributes of this resource. (NOTE) Some attributesare not given arguments in this group but can be set in other ways.
- REQUIRED FLAGS
--service-project=SERVICE_PROJECT- Project ID or project number of the service network.
--type=TYPE- Type of private connection.
TYPEmust be one of:DELL_POWERSCALE- Peering connection used for connecting to Dell PowerScale.
NETAPP_CLOUD_VOLUMES- Peering connection used for connecting to NetApp Cloud Volumes.
PRIVATE_SERVICE_ACCESS- Peering connection used for establishingprivateservices access.
THIRD_PARTY_SERVICE- Peering connection used for connecting to third-party services. Most third-partyservices require manual setup of reverse peering on the VPC network associatedwith the third-party service.
--vmware-engine-network=VMWARE_ENGINE_NETWORK- Resource ID of the legacy VMware Engine network. Provide the{vmware_engine_network_id}, which will be in the form of {location}-default. The{location} is the same as the location specified in the private connectionresource.
- OPTIONAL FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.The default is
True. Enabled by default, use--no-asyncto disable. --description=DESCRIPTION- Text describing the private connection.
--routing-mode=ROUTING_MODE- Type of the routing mode. Default value is set to GLOBAL. Fortype=PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or REGIONAL, forother types only GLOBAL is supported.
ROUTING_MODEmustbe one of:GLOBAL,REGIONAL. --service-network=SERVICE_NETWORK- Resource ID of the service network to connect with the VMware Engine network tocreate a private connection.
- For type=PRIVATE_SERVICE_ACCESS, this field represents service networking VPC.In this case the field value will be automatically set to
servicenetworkingand cannot be changed. - For type=NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC. In thiscase the field value will be automatically set to
netapp-tenant-vpcand cannot be changed. - For type=DELL_POWERSCALE, this field represents Dell service VPC. In this casethe field value will be automatically set to
dell-tenant-vpcandcannot be changed. - For type=THIRD_PARTY_SERVICE, this field could represent a consumer VPC or anyother producer VPC to which the VMware Engine Network needs to be connected.service-network field is required for this type.
- For type=PRIVATE_SERVICE_ACCESS, this field represents service networking VPC.In this case the field value will be automatically set to
- 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.
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-22 UTC.