gcloud services vpc-peerings connect - connect to a service via VPC peering for a project network
gcloud services vpc-peerings connect --network=NETWORK --ranges=RANGES [--async] [--service=SERVICE; default="servicenetworking.googleapis.com"] [GCLOUD_WIDE_FLAG ...]
This command connects a private service connection to a service via a VPC network.
To connect a network called my-network on the current project to a service called your-service with IP CIDR ranges google-range-1,google-range-2 for the service to use, run:
$ gcloud services vpc-peerings connect --network=my-network \ --service=your-service --ranges=google-range-1,google-range-2
To run the same command asynchronously (non-blocking), run:
$ gcloud services vpc-peerings connect --network=my-network \ --service=your-service --ranges=google-range-1,google-range-2 \ --async
- --network=NETWORK
The network in the current project to be peered with the service
- --ranges=RANGES
The names of IP CIDR ranges for service to use.
- --async
Return immediately, without waiting for the operation in progress to complete.
- --service=SERVICE; default="servicenetworking.googleapis.com"
The service to connect to
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.
These variants are also available:
$ gcloud alpha services vpc-peerings connect
$ gcloud beta services vpc-peerings connect