gcloud network-connectivity spokes linked-vpc-network create

NAME
gcloud network-connectivity spokes linked-vpc-network create - create a new VPC spoke
SYNOPSIS
gcloud network-connectivity spokes linked-vpc-network createSPOKE--hub=HUB--vpc-network=VPC_NETWORK[--async][--description=DESCRIPTION][--exclude-export-ranges=[CIDR_RANGE,…]][--global][--include-export-ranges=[CIDR_RANGE,…]][--labels=[KEY=VALUE,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
Create a new VPC spoke.
EXAMPLES
To create a VPC spoke namedmyspoke, run:
gcloudnetwork-connectivityspokeslinked-vpc-networkcreatemyspoke--hub=https://www.googleapis.com/networkconnectivity/v1/projects/my-project/locations/global/hubs/my-hub--global--vpc-network=https://www.googleapis.com/compute/v1/projects/my-project/global/networks/my-vpc
POSITIONAL ARGUMENTS
Spoke resource - Name of the spoke to create. This represents a Cloud resource.(NOTE) Some attributes are not given arguments in this group but can be set inother 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.

To set thelocation attribute:

  • provide the argumentspoke on the command line with a fullyspecified name;
  • provide the argument--global on the command line.

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.
REQUIRED FLAGS
--hub=HUB
Hub that the spoke will attach to. The hub must already exist.
--vpc-network=VPC_NETWORK
VPC network that the spoke provides connectivity to. The resource must alreadyexist.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--description=DESCRIPTION
Description of the spoke to create.
--exclude-export-ranges=[CIDR_RANGE,…]
Subnet IP address range(s) to hide from other VPC networks that are connectedthrough Network Connectivity Center.
--global
Indicates that the spoke is global.
--include-export-ranges=[CIDR_RANGE,…]
Subnet IP address range(s) to export to other VPC networks that are connectedthrough Network Connectivity Center.
--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.

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 the networkconnectivity/v1 API. The full documentation forthis API can be found at:https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest
NOTES
This variant is also available:
gcloudbetanetwork-connectivityspokeslinked-vpc-networkcreate

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.