gcloud network-connectivity spokes linked-vpn-tunnels create

NAME
gcloud network-connectivity spokes linked-vpn-tunnels create - create a new VPN spoke
SYNOPSIS
gcloud network-connectivity spokes linked-vpn-tunnels create(SPOKE :--region=REGION)--hub=HUB--vpn-tunnels=[VPN_TUNNELS,…][--async][--description=DESCRIPTION][--group=GROUP][--include-import-ranges=[INCLUDE_IMPORT_RANGES,…]][--labels=[KEY=VALUE,…]][--site-to-site-data-transfer][GCLOUD_WIDE_FLAG]
DESCRIPTION
Create a newVPNspoke.
EXAMPLES
To create a VPN spoke in regionus-central1that uses data transfer and has two tunnels, run:
gcloudnetwork-connectivityspokeslinked-vpn-tunnelscreatemy-spoke--hub="https://www.googleapis.com/networkconnectivity/v1/project\s/my-project/locations/global/hubs/my-hub"--region=us-central1\--vpn-tunnels=https://www.googleapis.com/compute/v1/projects/\my-project/regions/us-central1/vpnTunnels/vpn-tunnel1,https://\www.googleapis.com/compute/v1/projects/my-project/regions/\us-central1/vpnTunnels/vpn-tunnel2--site-to-site-data-transfer
POSITIONAL ARGUMENTS
Spoke resource - Name of the spoke to be created. 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 theproject attribute:

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

This must be specified.

SPOKE
ID of the spoke or fully qualified identifier for the spoke.

To set thespoke attribute:

  • provide the argumentspoke on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--region=REGION
The location Id.To set theregion attribute:
  • provide the argumentspoke on the command line with a fullyspecified name;
  • provide the argument--region on the command line.
REQUIRED FLAGS
--hub=HUB
Hub that the spoke will attach to. The hub must already exist.
--vpn-tunnels=[VPN_TUNNELS,…]
HA VPN tunnels that the spoke provides connectivity to. The resources mustalready exist.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--description=DESCRIPTION
Description of the spoke to create.
--group=GROUP
The group that the spoke will be added to. The group must already exist. Ifunset, the spoke will be added to the ``default`` group.
--include-import-ranges=[INCLUDE_IMPORT_RANGES,…]
IP address range(s) allowed to be imported from hub subnets. Only``ALL_IPV4_RANGES`` can be added to the list. If it's empty, the spoke does notimport any subnets from the hub.
--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.

--site-to-site-data-transfer
Whether to enable site-to-site data transfer for this spoke. Data transfer isavailable only insupportedlocations.
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 thenetworkconnectivity/v1 API. The fulldocumentation for this API can be found at:https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest
NOTES
This variant is also available:
gcloudbetanetwork-connectivityspokeslinked-vpn-tunnelscreate

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-12-09 UTC.