google_workstations_workstation_cluster

A grouping of workstation configurations and the associated workstations in that region.

To get more information about WorkstationCluster, see:

Open in Cloud Shell

Example Usage - Workstation Cluster Basic

resource "google_workstations_workstation_cluster" "default" {
  provider               = google-beta
  workstation_cluster_id = "workstation-cluster"
  network                = google_compute_network.default.id
  subnetwork             = google_compute_subnetwork.default.id
  location               = "us-central1"

  labels = {
    "label" = "key"
  }

  annotations = {
    label-one = "value-one"
  }
}

data "google_project" "project" {
  provider = google-beta
}

resource "google_compute_network" "default" {
  provider                = google-beta
  name                    = "workstation-cluster"
  auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "default" {
  provider      = google-beta
  name          = "workstation-cluster"
  ip_cidr_range = "10.0.0.0/24"
  region        = "us-central1"
  network       = google_compute_network.default.name
}
Open in Cloud Shell

Example Usage - Workstation Cluster Private

resource "google_workstations_workstation_cluster" "default" {
  provider               = google-beta
  workstation_cluster_id = "workstation-cluster-private"
  network                = google_compute_network.default.id
  subnetwork             = google_compute_subnetwork.default.id
  location               = "us-central1"

  private_cluster_config {
    enable_private_endpoint = true
  }

  labels = {
    "label" = "key"
  }

  annotations = {
    label-one = "value-one"
  }
}

data "google_project" "project" {
  provider = google-beta
}

resource "google_compute_network" "default" {
  provider                = google-beta
  name                    = "workstation-cluster-private"
  auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "default" {
  provider = google-beta
  name          = "workstation-cluster-private"
  ip_cidr_range = "10.0.0.0/24"
  region        = "us-central1"
  network       = google_compute_network.default.name
}
Open in Cloud Shell

Example Usage - Workstation Cluster Custom Domain

resource "google_workstations_workstation_cluster" "default" {
  provider               = google-beta
  workstation_cluster_id = "workstation-cluster-custom-domain"
  network                = google_compute_network.default.id
  subnetwork             = google_compute_subnetwork.default.id
  location               = "us-central1"

  private_cluster_config {
    enable_private_endpoint = true
  }

  domain_config {
    domain = "workstations.example.com"
  }

  labels = {
    "label" = "key"
  }

  annotations = {
    label-one = "value-one"
  }
}

data "google_project" "project" {
  provider = google-beta
}

resource "google_compute_network" "default" {
  provider                = google-beta
  name                    = "workstation-cluster-custom-domain"
  auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "default" {
  provider = google-beta
  name          = "workstation-cluster-custom-domain"
  ip_cidr_range = "10.0.0.0/24"
  region        = "us-central1"
  network       = google_compute_network.default.name
}

Argument Reference

The following arguments are supported:


The private_cluster_config block supports:

The domain_config block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

The conditions block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

WorkstationCluster can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import WorkstationCluster using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}"
  to = google_workstations_workstation_cluster.default
}

When using the terraform import command, WorkstationCluster can be imported using one of the formats above. For example:

$ terraform import google_workstations_workstation_cluster.default projects/{{project}}/locations/{{location}}/workstationClusters/{{workstation_cluster_id}}
$ terraform import google_workstations_workstation_cluster.default {{project}}/{{location}}/{{workstation_cluster_id}}
$ terraform import google_workstations_workstation_cluster.default {{location}}/{{workstation_cluster_id}}

User Project Overrides

This resource supports User Project Overrides.