Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom domain config to Cloud Workstations cluster #16464

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
3 changes: 3 additions & 0 deletions .changelog/9419.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
workstations: add `domain_config` field to resource `google_workstations_workstation_cluster` (beta)
```
62 changes: 62 additions & 0 deletions website/docs/r/workstations_workstation_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,57 @@ resource "google_compute_subnetwork" "default" {
network = google_compute_network.default.name
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgit.luolix.top%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=workstation_cluster_custom_domain&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Workstation Cluster Custom Domain


```hcl
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

Expand Down Expand Up @@ -165,6 +216,11 @@ The following arguments are supported:
Configuration for private cluster.
Structure is [documented below](#nested_private_cluster_config).

* `domain_config` -
(Optional)
Configuration options for a custom domain.
Structure is [documented below](#nested_domain_config).

* `location` -
(Optional)
The location where the workstation cluster should reside.
Expand Down Expand Up @@ -196,6 +252,12 @@ The following arguments are supported:
Additional project IDs that are allowed to attach to the workstation cluster's service attachment.
By default, the workstation cluster's project and the VPC host project (if different) are allowed.

<a name="nested_domain_config"></a>The `domain_config` block supports:

* `domain` -
(Required)
Domain used by Workstations for HTTP ingress.

## Attributes Reference

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