- NAME
-
- gcloud beta compute networks vpc-access connectors create - create a VPC Access connector
- SYNOPSIS
-
-
gcloud beta compute networks vpc-access connectors create
(CONNECTOR
:--region
=REGION
) [--async
] [--machine-type
=MACHINE_TYPE
] [--max-instances
=MAX_INSTANCES
; default=10--min-instances
=MIN_INSTANCES
; default=2 |--max-throughput
=MAX_THROUGHPUT
--min-throughput
=MIN_THROUGHPUT
] [--network
=NETWORK
; default="default"--range
=RANGE
|--subnet
=SUBNET
--subnet-project
=SUBNET_PROJECT
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(BETA)
Create a new VPC Access connector with the given name.This command can fail for the following reasons:
- An instance with the same name already exists.
- The active account does not have permission to create instances.
- EXAMPLES
-
The following command creates a VPC Access connector with name
'my-vpc-connector' in region 'us-central1' in network 'my-network' with IP CIDR
range of '10.132.0.0/28'.
gcloud beta compute networks vpc-access connectors create my-vpc-connector --region=us-central1 --network=my-network --range=10.132.0.0/28
- POSITIONAL ARGUMENTS
-
-
Connector resource - Arguments and flags that specify the VPC Access connector
you want to create. The arguments in this group can be used to specify the
attributes of this resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.
To set the
project
attribute:-
provide the argument
connector
on the command line with a fully specified name; -
provide the argument
--project
on the command line; -
set the property
core/project
.
This must be specified.
CONNECTOR
-
ID of the connector or fully qualified identifier for the connector.
To set the
connector
attribute:-
provide the argument
connector
on the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--region
=REGION
-
Compute region (e.g. us-central1) for the connector.
To set the
region
attribute:-
provide the argument
connector
on the command line with a fully specified name; -
provide the argument
--region
on the command line.
-
provide the argument
-
provide the argument
-
Connector resource - Arguments and flags that specify the VPC Access connector
you want to create. The arguments in this group can be used to specify the
attributes of this resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.
- FLAGS
-
--async
- Return immediately, without waiting for the operation in progress to complete.
--machine-type
=MACHINE_TYPE
-
Machine type of VMs underlying the VPC Access connector. Accepted values are
,e2-micro
, andf1-micro
. If left unspecified, thee2-standard-4
machine type is used.e2-micro
-
At most one of these can be specified:
-
Scaling settings of a VPC Access Connector can be specified in terms of number
of Google Compute Engine VM instances underlying the connector autoscaling
group.
--max-instances
=MAX_INSTANCES
; default=10-
Maximum number of instances within an autoscaling group underlying the
connector. Value must be between 3 and 10, inclusive. Must be higher than the
value specified by
--min-instances
. --min-instances
=MIN_INSTANCES
; default=2-
Minimum number of instances within an autoscaling group underlying the
connector. Value must be between 2 and 9, inclusive. Must be lower than the
value specified by
--max-instances
.
-
Scaling settings of a VPC Access Connector can be specified in terms of
throughput.
--max-throughput
=MAX_THROUGHPUT
-
Maximum throughput of the connector in Mbps. Refers to the expected throughput
when using an
e2-micro
machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by--min-throughput
. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput. The use ofmax-throughput
is discouraged in favor ofmax-instances
. --min-throughput
=MIN_THROUGHPUT
-
Minimum throughput of the connector in Mbps. Refers to the expected throughput
when using an
e2-micro
machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by--max-throughput
. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput. The use ofmin-throughput
is discouraged in favor ofmin-instances
.
-
Scaling settings of a VPC Access Connector can be specified in terms of number
of Google Compute Engine VM instances underlying the connector autoscaling
group.
-
At most one of these can be specified:
-
The Serverless VPC Access API can internally manage the creation of a subnet to
house the VPC connector. To create this subnet, the network ID (--network) and
an IP CIDR range (--range) for the subnet must be provided.
--network
=NETWORK
; default="default"- Name of the Compute Engine network to which the connector will be connected. If left unspecified, the default network will be used.
--range
=RANGE
- CIDR range of internal addresses that are reserved for this connector. For example, 10.132.0.0/28. Range must be unique and non-overlapping with existing ranges in the network.
-
You can specify a subnet in which to place the connector rather than using an
internally managed subnet. If you wish to use this connector to attach your
Serverless application to a Shared VPC, first share a subnet to the project to
which you are deploying your connector. Then, supply the name of the subnet
(--subnet) and the project ID (--subnet-project) from which the subnet is hosted
to connect to this VPC.
--subnet
=SUBNET
-
User-provided subnet to house the connector. This field can be used in favor of
specifying the
network
andrange
fields. e.g. "my-subnet" --subnet-project
=SUBNET_PROJECT
- Project ID of the provided subnet. The default is the project of the connector.
-
The Serverless VPC Access API can internally manage the creation of a subnet to
house the VPC connector. To create this subnet, the network ID (--network) and
an IP CIDR range (--range) for the subnet must be provided.
- 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
vpcaccess/v1beta1
API. The full documentation for this API can be found at: https://cloud.google.com/vpc/docs/configure-serverless-vpc-access - NOTES
-
This command is currently in beta and might change without notice. This variant
is also available:
gcloud compute networks vpc-access connectors create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-02-06 UTC.",
"confidential": False
}