Workstation


Property Value
Google Cloud Service Name Cloud Workstations
Google Cloud Service Documentation /workstations/docs/
Google Cloud REST Resource Name v1.projects.locations.workstationClusters.workstationConfigs.workstations
Google Cloud REST Resource Documentation Custom Resource Definition Properties

Spec

Schema

annotations:
- key: string
  value: string
displayName: string
labels:
- key: string
  value: string
parentRef:
  external: string
  name: string
  namespace: string
resourceID: string
Fields

annotations

Optional

list (object)

Optional. Client-specified annotations.

annotations[]

Optional

object

annotations[].key

Optional

string

Key for the annotation.

annotations[].value

Optional

string

Value for the annotation.

displayName

Optional

string

Optional. Human-readable name for this workstation.

labels

Optional

list (object)

Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation and that are also propagated to the underlying Compute Engine resources.

labels[]

Optional

object

labels[].key

Optional

string

Key for the label.

labels[].value

Optional

string

Value for the label.

parentRef

Required

object

Parent is a reference to the parent WorkstationConfig for this Workstation.

parentRef.external

Optional

string

A reference to an externally managed WorkstationConfig resource. Should be in the format "projects/{{projectID}}/locations/{{location}}/workstationClusters/{{workstationclusterID}}/workstationConfigs/{{workstationconfigID}}".

parentRef.name

Optional

string

The name of a WorkstationConfig resource.

parentRef.namespace

Optional

string

The namespace of a WorkstationConfig resource.

resourceID

Optional

string

Immutable. The Workstation name. If not given, the metadata.name will be used.

Status

Schema

conditions:
- lastTransitionTime: string
  message: string
  reason: string
  status: string
  type: string
externalRef: string
observedGeneration: integer
observedState:
  createTime: string
  deleteTime: string
  etag: string
  host: string
  startTime: string
  state: string
  uid: string
  updateTime: string
Fields
conditions

list (object)

Conditions represent the latest available observations of the object's current state.

conditions[]

object

conditions[].lastTransitionTime

string

Last time the condition transitioned from one status to another.

conditions[].message

string

Human-readable message indicating details about last transition.

conditions[].reason

string

Unique, one-word, CamelCase reason for the condition's last transition.

conditions[].status

string

Status is the status of the condition. Can be True, False, Unknown.

conditions[].type

string

Type is the type of the condition.

externalRef

string

A unique specifier for the Workstation resource in GCP.

observedGeneration

integer

ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.

observedState

object

ObservedState is the state of the resource as most recently observed in GCP.

observedState.createTime

string

Output only. Time when this workstation was created.

observedState.deleteTime

string

Output only. Time when this workstation was soft-deleted.

observedState.etag

string

Output only. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.

observedState.host

string

Output only. Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format `{port}-{host}`.

observedState.startTime

string

Output only. Time when this workstation was most recently successfully started, regardless of the workstation's initial state.

observedState.state

string

Output only. Current state of the workstation.

observedState.uid

string

Output only. A system-assigned unique identifier for this workstation.

observedState.updateTime

string

Output only. Time when this workstation was most recently updated.

Sample YAML(s)

Basic Workstation

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: workstations.cnrm.cloud.google.com/v1beta1
kind: Workstation
metadata:
  name: workstationconfig-sample
spec:
  parentRef:
    name: workstationconfig-dep
  displayName: workstationconfig-sample
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeNetwork
metadata:
  name: computenetwork-dep
spec:
  routingMode: GLOBAL
  autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeSubnetwork
metadata:
  name: computesubnetwork-dep
spec:
  ipCidrRange: 10.0.0.0/24
  region: us-west1
  networkRef:
    name: computenetwork-dep
---
apiVersion: workstations.cnrm.cloud.google.com/v1beta1
kind: WorkstationCluster
metadata:
  name: workstationcluster-dep
spec:
  projectRef:
    external: "projects/${PROJECT_NUMBER1}"
  location: us-west1
  networkRef:
    name: computenetwork-dep
  subnetworkRef:
    name: computesubnetwork-dep
---
apiVersion: workstations.cnrm.cloud.google.com/v1beta1
kind: WorkstationConfig
metadata:
  name: workstationconfig-dep
spec:
  parentRef:
    name: workstationcluster-dep
  idleTimeout: "1200s"
  runningTimeout: "43200s"
  host:
    gceInstance:
      machineType: "e2-standard-4"
      serviceAccountRef:
        external: "service-${PROJECT_NUMBER1}@gcp-sa-workstationsvm.iam.gserviceaccount.com"
      bootDiskSizeGB: 50
  container:
    image: "us-west1-docker.pkg.dev/cloud-workstations-images/predefined/code-oss:latest"
  replicaZones:
    - us-west1-a
    - us-west1-b