Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions mmv1/products/workstations/WorkstationCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ examples:
test_vars_overrides:
'key_short_name': '"tf-test-key-" + acctest.RandString(t, 10)'
'value_short_name': '"tf-test-value-" + acctest.RandString(t, 10)'
samples:
- name: "workstation_cluster_urls"
primary_resource_id: "default"
steps:
- name: "workstation_cluster_custom_urls"
vars:
cluster_id: "custom-urls-cluster"
resource_id_vars:
cluster_network_name: "workstations-network"
parameters:
- name: 'workstationClusterId'
type: String
Expand Down Expand Up @@ -120,6 +129,17 @@ properties:
type: String
description: |
Human-readable name for this resource.
- name: 'workstationAuthorizationUrl'
type: String
default_from_api: true
description: |
Specifies the redirect URL for unauthorized requests received by workstation VMs in this cluster.
Redirects to this endpoint will send a base64 encoded `state` query param containing the target workstation name and original request hostname. The endpoint is responsible for retrieving a token using `GenerateAccessToken` and redirecting back to the original hostname with the token.
- name: 'workstationLaunchUrl'
type: String
description: |
Specifies the launch URL for workstations in this cluster. Requests sent to unstarted workstations will be redirected to this URL.
Requests redirected to the launch endpoint will be sent with a `workstation` query parameter containing the full workstation resource. The launch endpoint is responsible for starting the workstation, polling it until it reaches `STATE_RUNNING`, and then issuing a redirect to the workstation's host URL.
- name: 'degraded'
type: Boolean
description: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
resource "google_workstations_workstation_cluster" "{{$.PrimaryResourceId}}" {
workstation_cluster_id = "{{index $.Vars "cluster_id"}}"
network = google_compute_network.default.id
subnetwork = google_compute_subnetwork.default.id
location = "us-central1"

workstation_authorization_url = "https://workstations.cloud.google.com/ui/auth"
workstation_launch_url = "https://console.cloud.google.com/workstations/launch"
}

data "google_project" "project" {
}

resource "google_compute_network" "default" {
name = "{{index $.ResourceIdVars "cluster_network_name"}}"
auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "default" {
name = "{{index $.ResourceIdVars "cluster_network_name"}}"
ip_cidr_range = "10.0.0.0/24"
region = "us-central1"
network = google_compute_network.default.name
}
Loading