Skip to content

Commit aec2ba2

Browse files
Add field controlPlaneIp to the WorkstationCluster.yaml spec (#10427) (#7240)
[upstream:2ca57a0d5bebc3587158a297066702a5db11c144] Signed-off-by: Modular Magician <[email protected]>
1 parent 0eeaede commit aec2ba2

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.changelog/10427.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
workstations: added output-only field `control_plane_ip` to `google_workstations_workstation_cluster` resource (beta)
3+
```

google-beta/services/workstations/resource_workstations_workstation_cluster.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ To access workstations in the cluster, configure access to the managed service u
188188
},
189189
},
190190
},
191+
"control_plane_ip": {
192+
Type: schema.TypeString,
193+
Computed: true,
194+
Description: `The private IP address of the control plane for this workstation cluster.
195+
Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.`,
196+
},
191197
"create_time": {
192198
Type: schema.TypeString,
193199
Computed: true,
@@ -415,6 +421,9 @@ func resourceWorkstationsWorkstationClusterRead(d *schema.ResourceData, meta int
415421
if err := d.Set("subnetwork", flattenWorkstationsWorkstationClusterSubnetwork(res["subnetwork"], d, config)); err != nil {
416422
return fmt.Errorf("Error reading WorkstationCluster: %s", err)
417423
}
424+
if err := d.Set("control_plane_ip", flattenWorkstationsWorkstationClusterControlPlaneIp(res["controlPlaneIp"], d, config)); err != nil {
425+
return fmt.Errorf("Error reading WorkstationCluster: %s", err)
426+
}
418427
if err := d.Set("display_name", flattenWorkstationsWorkstationClusterDisplayName(res["displayName"], d, config)); err != nil {
419428
return fmt.Errorf("Error reading WorkstationCluster: %s", err)
420429
}
@@ -687,6 +696,10 @@ func flattenWorkstationsWorkstationClusterSubnetwork(v interface{}, d *schema.Re
687696
return v
688697
}
689698

699+
func flattenWorkstationsWorkstationClusterControlPlaneIp(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
700+
return v
701+
}
702+
690703
func flattenWorkstationsWorkstationClusterDisplayName(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
691704
return v
692705
}

website/docs/r/workstations_workstation_cluster.html.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ In addition to the arguments listed above, the following computed attributes are
270270
* `uid` -
271271
The system-generated UID of the resource.
272272

273+
* `control_plane_ip` -
274+
The private IP address of the control plane for this workstation cluster.
275+
Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.
276+
273277
* `degraded` -
274278
Whether this resource is in degraded mode, in which case it may require user action to restore full functionality.
275279
Details can be found in the conditions field.

0 commit comments

Comments
 (0)