File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_compute_service-attachments_create.1
.TH "GCLOUD_BETA_COMPUTE_SERVICE\-ATTACHMENTS_CREATE" 1
.SH "NAME"
.HP
gcloud beta compute service\-attachments create \- create a Google Compute Engine service attachment
.SH "SYNOPSIS"
.HP
\f5gcloud beta compute service\-attachments create\fR \fINAME\fR \fB\-\-nat\-subnets\fR=\fINAT_SUBNETS\fR,[\fINAT_SUBNETS\fR,...] (\fB\-\-producer\-forwarding\-rule\fR=\fIPRODUCER_FORWARDING_RULE\fR\ |\ \fB\-\-target\-service\fR=\fITARGET_SERVICE\fR) [\fB\-\-connection\-preference\fR=\fICONNECTION_PREFERENCE\fR;\ default=\f5"ACCEPT_AUTOMATIC"\fR] [\fB\-\-consumer\-accept\-list\fR=[\fIPROJECT_OR_NETWORK\fR=\fILIMIT\fR,...]] [\fB\-\-consumer\-reject\-list\fR=[\fIREJECT_LIST\fR,...]] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-domain\-names\fR=[\fIDOMAIN_NAMES\fR,...]] [\fB\-\-enable\-proxy\-protocol\fR] [\fB\-\-nat\-subnets\-region\fR=\fINAT_SUBNETS_REGION\fR] [\fB\-\-propagated\-connection\-limit\fR=\fIPROPAGATED_CONNECTION_LIMIT\fR] [\fB\-\-reconcile\-connections\fR] [\fB\-\-region\fR=\fIREGION\fR] [\fB\-\-global\-producer\-forwarding\-rule\fR\ |\ \fB\-\-producer\-forwarding\-rule\-region\fR=\fIPRODUCER_FORWARDING_RULE_REGION\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR \fBgcloud beta compute service\-attachments create\fR is used to
create service attachments. A service producer creates service attachments to
make a service available to consumers. Service consumers use Private Service
Connect endpoints to privately forward traffic to the service attachment.
.SH "EXAMPLES"
If there is an already\-created internal load balancer (ILB) with the name
MY_ILB in region us\-central1 and there is an already\-created Private Service
Connect subnets MY_SUBNET1 and MY_SUBNET2, create a service attachment pointing
to the ILB by running:
.RS 2m
$ gcloud beta compute service\-attachments create \e
SERVICE_ATTACHMENT_NAME \-\-region=us\-central1 \e
\-\-producer\-forwarding\-rule=MY_ILB \e
\-\-connection\-preference=ACCEPT_AUTOMATIC \e
\-\-nat\-subnets=MY_SUBNET1,MY_SUBNET2
.RE
To create a service attachment with a textual description, run:
.RS 2m
$ gcloud beta compute service\-attachments create \e
SERVICE_ATTACHMENT_NAME \-\-region=us\-central1 \e
\-\-producer\-forwarding\-rule=MY_ILB \e
\-\-connection\-preference=ACCEPT_AUTOMATIC \e
\-\-nat\-subnets=MY_SUBNET1,MY_SUBNET2 \e
\-\-description='default service attachment'
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fINAME\fR
Name of the service attachment to create.
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-nat\-subnets\fR=\fINAT_SUBNETS\fR,[\fINAT_SUBNETS\fR,...]
The subnetworks provided by service producer to use for NAT
.TP 2m
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-producer\-forwarding\-rule\fR=\fIPRODUCER_FORWARDING_RULE\fR
Target forwarding rule that receives forwarded traffic.
.TP 2m
\fB\-\-target\-service\fR=\fITARGET_SERVICE\fR
URL of the target service that receives forwarded traffic.
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-connection\-preference\fR=\fICONNECTION_PREFERENCE\fR; default=\f5"ACCEPT_AUTOMATIC"\fR
This defines the service attachment's connection preference.
\fICONNECTION_PREFERENCE\fR must be one of:
.RS 2m
.TP 2m
\fBACCEPT_AUTOMATIC\fR
Always accept connection requests from consumers automatically.
.TP 2m
\fBACCEPT_MANUAL\fR
Only accept connection requests from consumers with the approval of the service
provider.
.RE
.sp
.TP 2m
\fB\-\-consumer\-accept\-list\fR=[\fIPROJECT_OR_NETWORK\fR=\fILIMIT\fR,...]
Specifies which consumer projects or networks are allowed to connect to the
service attachment. Each project or network has a connection limit. A given
service attachment can manage connections at either the project or network
level. Therefore, both the accept and reject lists for a given service
attachment must contain either only projects or only networks.
For example, \f5\-\-consumer\-accept\-list myProjectId1=20\fR accepts a consumer
project myProjectId1 with connection limit 20; \f5\-\-consumer\-accept\-list
projects/myProjectId1/global/networks/myNet1=20\fR accepts a consumer network
myNet1 with connection limit 20
.RS 2m
.IP "\(em" 2m
\f5PROJECT_OR_NETWORK\fR \- Consumer project ID, project number or network URL.
.IP "\(em" 2m
\f5CONNECTION_LIMIT\fR \- The maximum number of allowed connections.
.RE
.sp
.TP 2m
\fB\-\-consumer\-reject\-list\fR=[\fIREJECT_LIST\fR,...]
Specifies a comma separated list of projects or networks that are not allowed to
connect to this service attachment. The project can be specified using its
project ID or project number and the network can be specified using its URL. A
given service attachment can manage connections at either the project or network
level. Therefore, both the reject and accept lists for a given service
attachment must contain either only projects or only networks.
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
An optional, textual description for the service attachment.
.TP 2m
\fB\-\-domain\-names\fR=[\fIDOMAIN_NAMES\fR,...]
Specifies a comma separated list of DNS domain names that are used during DNS
integration on PSC connected endpoints.
.TP 2m
\fB\-\-enable\-proxy\-protocol\fR
If True, then enable the proxy protocol which is for supplying client TCP/IP
address data in TCP connections that traverse proxies on their way to
destination servers.
.TP 2m
\fB\-\-nat\-subnets\-region\fR=\fINAT_SUBNETS_REGION\fR
Region of the subnetworks to operate on. If not specified, it will be set to the
region of the service attachment. Overrides the default \fBcompute/region\fR
property value for this command invocation.
.TP 2m
\fB\-\-propagated\-connection\-limit\fR=\fIPROPAGATED_CONNECTION_LIMIT\fR
The number of consumer spokes that connected Private Service Connect endpoints
can be propagated to through Network Connectivity Center. This limit lets the
service producer limit how many propagated Private Service Connect connections
can be established to this service attachment from a single consumer.
If the connection preference of the service attachment is ACCEPT_MANUAL, the
limit applies to each project or network that is listed in the consumer accept
list. If the connection preference of the service attachment is
ACCEPT_AUTOMATIC, the limit applies to each project that contains a connected
endpoint.
If unspecified, the default propagated connection limit is 250.
.TP 2m
\fB\-\-reconcile\-connections\fR
Determines whether to apply changes to consumer accept or reject lists to
existing connections or only to new connections.
If false, existing endpoints with a connection status of ACCEPTED or REJECTED
are not updated.
If true, existing endpoints with a connection status of ACCEPTED or REJECTED are
updated based on the connection policy update. For example, if a project or
network is removed from the \-\-consumer\-accept\-list and added to
\-\-consumer\-reject\-list, all the endpoints in that project or network with
the ACCEPTED state are set to REJECTED.
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Region of the service attachment to create. If not specified, you might be
prompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:
.RS 2m
$ gcloud config set compute/region REGION
.RE
A list of regions can be fetched by running:
.RS 2m
$ gcloud compute regions list
.RE
To unset the property, run:
.RS 2m
$ gcloud config unset compute/region
.RE
Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-global\-producer\-forwarding\-rule\fR
If set, the forwarding rule is global.
.TP 2m
\fB\-\-producer\-forwarding\-rule\-region\fR=\fIPRODUCER_FORWARDING_RULE_REGION\fR
Region of the forwarding rule to operate on. If not specified, you might be
prompted to select a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:
.RS 2m
$ gcloud config set compute/region REGION
.RE
A list of regions can be fetched by running:
.RS 2m
$ gcloud compute regions list
.RE
To unset the property, run:
.RS 2m
$ gcloud config unset compute/region
.RE
Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.
.RE
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud compute service\-attachments create
.RE
.RS 2m
$ gcloud alpha compute service\-attachments create
.RE