gcloud_alpha_services_vpc-peerings_connect (1)
NAME
- gcloud alpha services vpc-peerings connect - connect to a service via VPC peering for a project network
SYNOPSIS
-
gcloud alpha services vpc-peerings connect --network=NETWORK --ranges=RANGES [--async] [--service=SERVICE; default="servicenetworking.googleapis.com"] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) This command connects a network to a service via VPC peering for a
REQUIRED FLAGS
-
- --network=NETWORK
-
The network in the current project to be peered with the service
- --ranges=RANGES
-
IP CIDR ranges for service to use.
OPTIONAL FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --service=SERVICE; default="servicenetworking.googleapis.com"
-
The service to connect to
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To connect a network called my-network on the current project to a service called your-service with IP CIDR ranges 10.197.0.0/20,10.198.0.0/20 for the service to use, run:
-
$ gcloud alpha services vpc-peerings connect --network my-network \
--service your-service \
--ranges 10.197.0.0/20,10.198.0.0/20
To run the same command asynchronously (non-blocking), run:
-
$ gcloud alpha services vpc-peerings connect --network my-network \
--service your-service \
--ranges 10.197.0.0/20,10.198.0.0/20 --async
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support This variant is also available:
- $ gcloud beta services vpc-peerings connect