Skip to content

Commit 6b267bd

Browse files
authored
feat: add direct fleet registration option (#1878)
1 parent 2a39b0b commit 6b267bd

File tree

52 files changed

+225
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+225
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Then perform the following commands on the root folder:
167167
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
168168
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
169169
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
170+
| fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no |
170171
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
171172
| gce\_pd\_csi\_driver | Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no |
172173
| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no |
@@ -239,6 +240,7 @@ Then perform the following commands on the root folder:
239240
| ca\_certificate | Cluster ca certificate (base64 encoded) |
240241
| cluster\_id | Cluster ID |
241242
| endpoint | Cluster endpoint |
243+
| fleet\_membership | Fleet membership (if registered) |
242244
| gateway\_api\_channel | The gateway api channel of this cluster. |
243245
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
244246
| http\_load\_balancing\_enabled | Whether http load balancing enabled |

autogen/main/cluster.tf.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,13 @@ resource "google_container_cluster" "primary" {
347347
vulnerability_mode = var.security_posture_vulnerability_mode
348348
}
349349

350+
dynamic "fleet" {
351+
for_each = var.fleet_project != null ? [1] : []
352+
content {
353+
project = var.fleet_project
354+
}
355+
}
356+
350357
ip_allocation_policy {
351358
cluster_secondary_range_name = var.ip_range_pods
352359
services_secondary_range_name = var.ip_range_services

autogen/main/main.tf.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ locals {
6060
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
6161
{% endif %}
6262

63+
fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
64+
6365
release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : []
6466
gateway_api_config = var.gateway_api_channel != null ? [{ channel : var.gateway_api_channel }] : []
6567

autogen/main/outputs.tf.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,8 @@ output "identity_service_enabled" {
234234
value = local.cluster_pod_security_policy_enabled
235235
}
236236
{% endif %}
237+
238+
output "fleet_membership" {
239+
description = "Fleet membership (if registered)"
240+
value = local.fleet_membership
241+
}

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,3 +857,9 @@ variable "allow_net_admin" {
857857
default = null
858858
}
859859
{% endif %}
860+
861+
variable "fleet_project" {
862+
description = "(Optional) Register the cluster with the fleet in this project."
863+
type = string
864+
default = null
865+
}

cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,13 @@ resource "google_container_cluster" "primary" {
231231
vulnerability_mode = var.security_posture_vulnerability_mode
232232
}
233233

234+
dynamic "fleet" {
235+
for_each = var.fleet_project != null ? [1] : []
236+
content {
237+
project = var.fleet_project
238+
}
239+
}
240+
234241
ip_allocation_policy {
235242
cluster_secondary_range_name = var.ip_range_pods
236243
services_secondary_range_name = var.ip_range_services

examples/simple_regional/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ module "gke" {
4343
enable_cost_allocation = true
4444
enable_binary_authorization = var.enable_binary_authorization
4545
gcs_fuse_csi_driver = true
46+
fleet_project = var.project_id
4647
deletion_protection = false
4748
}

examples/simple_zonal_with_hub/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ It incorporates the standard cluster module, the [registration module](../../mod
2323
| ca\_certificate | n/a |
2424
| client\_token | n/a |
2525
| cluster\_name | Cluster name |
26+
| hub\_location | The location of the hub membership. |
2627
| ip\_range\_pods | The secondary IP range used for pods |
2728
| ip\_range\_services | The secondary IP range used for services |
2829
| kubernetes\_endpoint | n/a |

examples/simple_zonal_with_hub/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,8 @@ output "master_kubernetes_version" {
7979
description = "The master Kubernetes version"
8080
value = module.gke.master_version
8181
}
82+
83+
output "hub_location" {
84+
description = "The location of the hub membership."
85+
value = module.hub.location
86+
}

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ locals {
5454
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
5555
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
5656

57+
fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
58+
5759
release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : []
5860
gateway_api_config = var.gateway_api_channel != null ? [{ channel : var.gateway_api_channel }] : []
5961

modules/beta-autopilot-private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Then perform the following commands on the root folder:
9898
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `true` | no |
9999
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
100100
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
101+
| fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no |
101102
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
102103
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
103104
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
@@ -153,6 +154,7 @@ Then perform the following commands on the root folder:
153154
| cluster\_id | Cluster ID |
154155
| dns\_cache\_enabled | Whether DNS Cache enabled |
155156
| endpoint | Cluster endpoint |
157+
| fleet\_membership | Fleet membership (if registered) |
156158
| gateway\_api\_channel | The gateway api channel of this cluster. |
157159
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
158160
| http\_load\_balancing\_enabled | Whether http load balancing enabled |

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ resource "google_container_cluster" "primary" {
147147
vulnerability_mode = var.security_posture_vulnerability_mode
148148
}
149149

150+
dynamic "fleet" {
151+
for_each = var.fleet_project != null ? [1] : []
152+
content {
153+
project = var.fleet_project
154+
}
155+
}
156+
150157
ip_allocation_policy {
151158
cluster_secondary_range_name = var.ip_range_pods
152159
services_secondary_range_name = var.ip_range_services

modules/beta-autopilot-private-cluster/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ locals {
4949
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
5050
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
5151

52+
fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
53+
5254
release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : []
5355
gateway_api_config = var.gateway_api_channel != null ? [{ channel : var.gateway_api_channel }] : []
5456

modules/beta-autopilot-private-cluster/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,8 @@ output "identity_service_enabled" {
188188
description = "Whether Identity Service is enabled"
189189
value = local.cluster_pod_security_policy_enabled
190190
}
191+
192+
output "fleet_membership" {
193+
description = "Fleet membership (if registered)"
194+
value = local.fleet_membership
195+
}

modules/beta-autopilot-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,3 +460,9 @@ variable "allow_net_admin" {
460460
type = bool
461461
default = null
462462
}
463+
464+
variable "fleet_project" {
465+
description = "(Optional) Register the cluster with the fleet in this project."
466+
type = string
467+
default = null
468+
}

modules/beta-autopilot-public-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Then perform the following commands on the root folder:
8989
| enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `true` | no |
9090
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
9191
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
92+
| fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no |
9293
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
9394
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
9495
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
@@ -142,6 +143,7 @@ Then perform the following commands on the root folder:
142143
| cluster\_id | Cluster ID |
143144
| dns\_cache\_enabled | Whether DNS Cache enabled |
144145
| endpoint | Cluster endpoint |
146+
| fleet\_membership | Fleet membership (if registered) |
145147
| gateway\_api\_channel | The gateway api channel of this cluster. |
146148
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
147149
| http\_load\_balancing\_enabled | Whether http load balancing enabled |

modules/beta-autopilot-public-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ resource "google_container_cluster" "primary" {
147147
vulnerability_mode = var.security_posture_vulnerability_mode
148148
}
149149

150+
dynamic "fleet" {
151+
for_each = var.fleet_project != null ? [1] : []
152+
content {
153+
project = var.fleet_project
154+
}
155+
}
156+
150157
ip_allocation_policy {
151158
cluster_secondary_range_name = var.ip_range_pods
152159
services_secondary_range_name = var.ip_range_services

modules/beta-autopilot-public-cluster/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ locals {
4949
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
5050
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
5151

52+
fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
53+
5254
release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : []
5355
gateway_api_config = var.gateway_api_channel != null ? [{ channel : var.gateway_api_channel }] : []
5456

modules/beta-autopilot-public-cluster/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,8 @@ output "identity_service_enabled" {
178178
description = "Whether Identity Service is enabled"
179179
value = local.cluster_pod_security_policy_enabled
180180
}
181+
182+
output "fleet_membership" {
183+
description = "Fleet membership (if registered)"
184+
value = local.fleet_membership
185+
}

modules/beta-autopilot-public-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,9 @@ variable "allow_net_admin" {
430430
type = bool
431431
default = null
432432
}
433+
434+
variable "fleet_project" {
435+
description = "(Optional) Register the cluster with the fleet in this project."
436+
type = string
437+
default = null
438+
}

modules/beta-private-cluster-update-variant/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ Then perform the following commands on the root folder:
211211
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
212212
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
213213
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
214+
| fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no |
214215
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
215216
| gce\_pd\_csi\_driver | Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no |
216217
| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no |
@@ -293,6 +294,7 @@ Then perform the following commands on the root folder:
293294
| cluster\_id | Cluster ID |
294295
| dns\_cache\_enabled | Whether DNS Cache enabled |
295296
| endpoint | Cluster endpoint |
297+
| fleet\_membership | Fleet membership (if registered) |
296298
| gateway\_api\_channel | The gateway api channel of this cluster. |
297299
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
298300
| http\_load\_balancing\_enabled | Whether http load balancing enabled |

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ resource "google_container_cluster" "primary" {
281281
vulnerability_mode = var.security_posture_vulnerability_mode
282282
}
283283

284+
dynamic "fleet" {
285+
for_each = var.fleet_project != null ? [1] : []
286+
content {
287+
project = var.fleet_project
288+
}
289+
}
290+
284291
ip_allocation_policy {
285292
cluster_secondary_range_name = var.ip_range_pods
286293
services_secondary_range_name = var.ip_range_services

modules/beta-private-cluster-update-variant/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ locals {
5454
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
5555
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
5656

57+
fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
58+
5759
release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : []
5860
gateway_api_config = var.gateway_api_channel != null ? [{ channel : var.gateway_api_channel }] : []
5961

modules/beta-private-cluster-update-variant/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,8 @@ output "identity_service_enabled" {
214214
description = "Whether Identity Service is enabled"
215215
value = local.cluster_pod_security_policy_enabled
216216
}
217+
218+
output "fleet_membership" {
219+
description = "Fleet membership (if registered)"
220+
value = local.fleet_membership
221+
}

modules/beta-private-cluster-update-variant/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,3 +811,9 @@ variable "enable_gcfs" {
811811
description = "Enable image streaming on cluster level."
812812
default = false
813813
}
814+
815+
variable "fleet_project" {
816+
description = "(Optional) Register the cluster with the fleet in this project."
817+
type = string
818+
default = null
819+
}

modules/beta-private-cluster/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ Then perform the following commands on the root folder:
189189
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
190190
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
191191
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
192+
| fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no |
192193
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
193194
| gce\_pd\_csi\_driver | Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no |
194195
| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no |
@@ -271,6 +272,7 @@ Then perform the following commands on the root folder:
271272
| cluster\_id | Cluster ID |
272273
| dns\_cache\_enabled | Whether DNS Cache enabled |
273274
| endpoint | Cluster endpoint |
275+
| fleet\_membership | Fleet membership (if registered) |
274276
| gateway\_api\_channel | The gateway api channel of this cluster. |
275277
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
276278
| http\_load\_balancing\_enabled | Whether http load balancing enabled |

modules/beta-private-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ resource "google_container_cluster" "primary" {
281281
vulnerability_mode = var.security_posture_vulnerability_mode
282282
}
283283

284+
dynamic "fleet" {
285+
for_each = var.fleet_project != null ? [1] : []
286+
content {
287+
project = var.fleet_project
288+
}
289+
}
290+
284291
ip_allocation_policy {
285292
cluster_secondary_range_name = var.ip_range_pods
286293
services_secondary_range_name = var.ip_range_services

modules/beta-private-cluster/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ locals {
5454
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
5555
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
5656

57+
fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
58+
5759
release_channel = var.release_channel != null ? [{ channel : var.release_channel }] : []
5860
gateway_api_config = var.gateway_api_channel != null ? [{ channel : var.gateway_api_channel }] : []
5961

modules/beta-private-cluster/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,8 @@ output "identity_service_enabled" {
214214
description = "Whether Identity Service is enabled"
215215
value = local.cluster_pod_security_policy_enabled
216216
}
217+
218+
output "fleet_membership" {
219+
description = "Fleet membership (if registered)"
220+
value = local.fleet_membership
221+
}

modules/beta-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,3 +811,9 @@ variable "enable_gcfs" {
811811
description = "Enable image streaming on cluster level."
812812
default = false
813813
}
814+
815+
variable "fleet_project" {
816+
description = "(Optional) Register the cluster with the fleet in this project."
817+
type = string
818+
default = null
819+
}

modules/beta-public-cluster-update-variant/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Then perform the following commands on the root folder:
202202
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
203203
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers. Either flag `add_master_webhook_firewall_rules` or `add_cluster_firewall_rules` (also adds egress rules) must be set to `true` for inbound-ports firewall rules to be applied. | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
204204
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
205+
| fleet\_project | (Optional) Register the cluster with the fleet in this project. | `string` | `null` | no |
205206
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
206207
| gce\_pd\_csi\_driver | Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no |
207208
| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no |
@@ -282,6 +283,7 @@ Then perform the following commands on the root folder:
282283
| cluster\_id | Cluster ID |
283284
| dns\_cache\_enabled | Whether DNS Cache enabled |
284285
| endpoint | Cluster endpoint |
286+
| fleet\_membership | Fleet membership (if registered) |
285287
| gateway\_api\_channel | The gateway api channel of this cluster. |
286288
| horizontal\_pod\_autoscaling\_enabled | Whether horizontal pod autoscaling enabled |
287289
| http\_load\_balancing\_enabled | Whether http load balancing enabled |

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ resource "google_container_cluster" "primary" {
281281
vulnerability_mode = var.security_posture_vulnerability_mode
282282
}
283283

284+
dynamic "fleet" {
285+
for_each = var.fleet_project != null ? [1] : []
286+
content {
287+
project = var.fleet_project
288+
}
289+
}
290+
284291
ip_allocation_policy {
285292
cluster_secondary_range_name = var.ip_range_pods
286293
services_secondary_range_name = var.ip_range_services

0 commit comments

Comments
 (0)