- NAME
-
- gcloud alpha workstations configs create - create a workstation configuration
- SYNOPSIS
-
-
gcloud alpha workstations configs create(CONFIG:--cluster=CLUSTER--region=REGION) [--allow-unauthenticated-cors-preflight-requests] [--allowed-ports=[ALLOWED_PORTS,…]] [--async] [--boost-config=[BOOST_CONFIG,…]] [--boot-disk-size=BOOT_DISK_SIZE; default=50] [--container-args=[CONTAINER_ARGS,…]] [--container-command=[CONTAINER_COMMAND,…]] [--container-env=[CONTAINER_ENV,…]] [--container-run-as-user=CONTAINER_RUN_AS_USER] [--container-working-dir=CONTAINER_WORKING_DIR] [--disable-localhost-replacement] [--disable-public-ip-addresses] [--disable-ssh-to-vm] [--disable-tcp-connections] [--enable-audit-agent] [--enable-confidential-compute] [--enable-nested-virtualization] [--enable-ssh-to-vm] [--ephemeral-directory=[PROPERTY=VALUE,…]] [--grant-workstation-admin-role-on-create] [--idle-timeout=IDLE_TIMEOUT; default=7200] [--instance-metadata=[INSTANCE_METADATA,…]] [--labels=[LABELS,…]] [--machine-type=MACHINE_TYPE; default="e2-standard-4"] [--max-usable-workstations-count=MAX_USABLE_WORKSTATIONS_COUNT] [--network-tags=[NETWORK_TAGS,…]] [--pool-size=POOL_SIZE] [--replica-zones=[REPLICA_ZONES,…]] [--reservation-affinity=[RESERVATION_AFFINITY,…]] [--running-timeout=RUNNING_TIMEOUT; default=7200] [--service-account=SERVICE_ACCOUNT] [--service-account-scopes=[SERVICE_ACCOUNT_SCOPES,…]] [--shielded-integrity-monitoring] [--shielded-secure-boot] [--shielded-vtpm] [--startup-script-uri=STARTUP_SCRIPT_URI] [--vm-tags=[VM_TAGS,…]] [--accelerator-count=ACCELERATOR_COUNT:--accelerator-type=ACCELERATOR_TYPE] [--container-custom-image=CONTAINER_CUSTOM_IMAGE|--container-predefined-image=CONTAINER_PREDEFINED_IMAGE; default="codeoss"] [--kms-key=KMS_KEY:--kms-key-service-account=KMS_KEY_SERVICE_ACCOUNT] [--no-persistent-storage|--disk-reclaim-policy=DISK_RECLAIM_POLICY; default="delete"--disk-type=DISK_TYPE--disk-size=DISK_SIZE|--disk-source-snapshot=DISK_SOURCE_SNAPSHOT|--pd-disk-type=PD_DISK_TYPE; default="pd-standard"--pd-reclaim-policy=PD_RECLAIM_POLICY; default="delete"--pd-disk-size=PD_DISK_SIZE; default=200 |--pd-source-snapshot=PD_SOURCE_SNAPSHOT] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Create a workstation configuration. - EXAMPLES
-
To create a configuration with the 'e2-standard-8' machine type and a IntelliJ
image, run:
gcloud alpha workstations configs create CONFIG --machine-type=e2-standard-8 --container-predefined-image=intellijTo create a configuration with a Shielded VM instance that enables Secure Boot, virtual trusted platform module (vTPM) and integrity monitoring, run:
gcloud alpha workstations configs create CONFIG --machine-type=e2-standard-4 --shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoringTo create a configuration with a non-default persistent disk containing 10GB of PD SSD storage, run:
gcloud alpha workstations configs create CONFIG --machine-type=e2-standard-4 --pd-disk-type=pd-ssd --pd-disk-size=10 - POSITIONAL ARGUMENTS
-
-
Config resource - The group of arguments defining a config 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
projectattribute:-
provide the argument
configon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
CONFIG-
ID of the config or fully qualified identifier for the config.
To set the
configattribute:-
provide the argument
configon the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--cluster=CLUSTER-
The cluster for the config.
To set the
clusterattribute:-
provide the argument
configon the command line with a fully specified name; -
provide the argument
--clusteron the command line; -
set the property
workstations/cluster.
-
provide the argument
--region=REGION-
The region for the config.
To set the
regionattribute:-
provide the argument
configon the command line with a fully specified name; -
provide the argument
--regionon the command line; -
set the property
workstations/region.
-
provide the argument
-
provide the argument
-
Config resource - The group of arguments defining a config 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
-
--allow-unauthenticated-cors-preflight-requests- By default, the workstations service makes sure that all requests to the workstation are authenticated. CORS preflight requests do not include cookies or custom headers, and so are considered unauthenticated and blocked by the workstations service. Enabling this option allows these unauthenticated CORS preflight requests through to the workstation, where it becomes the responsibility of the destination server in the workstation to validate the request
--allowed-ports=[ALLOWED_PORTS,…]-
A Single or Range of ports externally accessible in the workstation. If not
specified defaults to ports 22, 80 and ports 1024-65535.
To specify a single port, both first and last should be same.
Example:
gcloud alpha workstations configs create --allowed-ports=first=9000,last=9090gcloud alpha workstations configs create --allowed-ports=first=80,last=80Sets
allowed_portsvalue.first-
Required, sets
firstvalue. last-
Required, sets
lastvalue.
Shorthand Example:--allowed-ports=first=int,last=int
JSON Example:--allowed-ports='{"first": int, "last": int}'
File Example:--allowed-ports=path_to_file.(yaml|json)
--async- Return immediately, without waiting for the operation in progress to complete.
--boost-config=[BOOST_CONFIG,…]-
Boost Configuration(s) that workstations running with this configuration can
boost up to. This includes id (required), machine-type, accelerator-type,
accelerator-count, pool-size, boot-disk-size, and enable-nested-virtualization.
Example:
gcloud alpha workstations configs create --boost-config=id=boost1,machine-type=n1-standard-4,accelerator-type=nvidia-tesla-t4,accelerator-count=1Sets
boost_configvalue.accelerator-count-
Sets
accelerator-countvalue. accelerator-type-
Sets
accelerator-typevalue. boot-disk-size-
Sets
boot-disk-sizevalue. enable-nested-virtualization-
Sets
enable-nested-virtualizationvalue. id-
Required, sets
idvalue. machine-type-
Sets
machine-typevalue. pool-size-
Sets
pool-sizevalue. reservation-affinity-
Sets
reservation-affinityvalue.consume-reservation-type-
Sets
consume-reservation-typevalue. key-
Sets
keyvalue. values-
Sets
valuesvalue.
Shorthand Example:--boost-config=accelerator-count=int,accelerator-type=string,boot-disk-size=int,enable-nested-virtualization=boolean,id=string,machine-type=string,pool-size=int,reservation-affinity={consume-reservation-type=string,key=string,values}
JSON Example:--boost-config='{"accelerator-count": int, "accelerator-type": "string", "boot-disk-size": int, "enable-nested-virtualization": boolean, "id": "string", "machine-type": "string", "pool-size": int, "reservation-affinity": {"consume-reservation-type": "string", "key": "string", "values"}}'
File Example:--boost-config=path_to_file.(yaml|json)
--boot-disk-size=BOOT_DISK_SIZE; default=50- Size of the boot disk in GB.
--container-args=[CONTAINER_ARGS,…]-
Arguments passed to the entrypoint.
Example:
gcloud alpha workstations configs create --container-args=arg_1,arg_2 --container-command=[CONTAINER_COMMAND,…]-
If set, overrides the default ENTRYPOINT specified by the image.
Example:
gcloud alpha workstations configs create --container-command=executable,parameter_1,parameter_2 --container-env=[CONTAINER_ENV,…]-
Environment variables passed to the container.
Example:
gcloud alpha workstations configs create --container-env=key1=value1,key2=value2 --container-run-as-user=CONTAINER_RUN_AS_USER- If set, overrides the USER specified in the image with the given uid.
--container-working-dir=CONTAINER_WORKING_DIR- If set, overrides the default DIR specified by the image.
--disable-localhost-replacement- By default, the workstations service replaces references to localhost, 127.0.0.1, and 0.0.0.0 with the workstation's hostname in http responses from the workstation so that applications under development run properly on the workstation. This may intefere with some applications, and so this option allows that behavior to be disabled.
--disable-public-ip-addresses- Default value is false. If set, instances will have no public IP address.
--disable-ssh-to-vm- (DEPR