Skip to content

Commit 85efdc1

Browse files
authored
feat(TPG>=6.36)!: add storage_pools support (#2326)
Signed-off-by: drfaust92 <[email protected]>
1 parent c028147 commit 85efdc1

File tree

30 files changed

+72
-33
lines changed

30 files changed

+72
-33
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ The node_pools variable takes the following parameters:
319319
| auto_repair | Whether the nodes will be automatically repaired | true | Optional |
320320
| autoscaling | Configuration required by cluster autoscaler to adjust the size of the node pool to the current cluster usage | true | Optional |
321321
| auto_upgrade | Whether the nodes will be automatically upgraded | true (if cluster is regional) | Optional |
322+
| storage_pools | The list of Storage Pools where boot disks are provisioned. | | Optional |
322323
| boot_disk_kms_key | The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool. This should be of the form projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. | " " | Optional |
323324
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
324325
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
@@ -417,7 +418,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
417418
#### Terraform and Plugins
418419

419420
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
420-
- [Terraform Provider for GCP][terraform-provider-google] v6.33+
421+
- [Terraform Provider for GCP][terraform-provider-google] v6.36+
421422

422423
#### gcloud
423424

autogen/main/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ The node_pools variable takes the following parameters:
198198
| auto_repair | Whether the nodes will be automatically repaired | true | Optional |
199199
| autoscaling | Configuration required by cluster autoscaler to adjust the size of the node pool to the current cluster usage | true | Optional |
200200
| auto_upgrade | Whether the nodes will be automatically upgraded | true (if cluster is regional) | Optional |
201+
| storage_pools | The list of Storage Pools where boot disks are provisioned. | | Optional |
201202
| boot_disk_kms_key | The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool. This should be of the form projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. | " " | Optional |
202203
| cpu_manager_policy | The CPU manager policy on the node. One of "none" or "static". | "static" | Optional |
203204
| cpu_cfs_quota | Enforces the Pod's CPU limit. Setting this value to false means that the CPU limits for Pods are ignored | null | Optional |
@@ -306,9 +307,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
306307

307308
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
308309
{% if beta_cluster %}
309-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.33+
310+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.36+
310311
{% else %}
311-
- [Terraform Provider for GCP][terraform-provider-google] v6.33+
312+
- [Terraform Provider for GCP][terraform-provider-google] v6.36+
312313
{% endif %}
313314

314315
#### gcloud

autogen/main/cluster.tf.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ resource "google_container_cluster" "primary" {
657657
boot_disk_kms_key = lookup(var.node_pools[0], "boot_disk_kms_key", var.boot_disk_kms_key)
658658
{% endif %}
659659

660+
storage_pools = lookup(var.node_pools[0], "storage_pools", null) != null ? [var.node_pools[0].storage_pools] : []
661+
660662
shielded_instance_config {
661663
enable_secure_boot = lookup(var.node_pools[0], "enable_secure_boot", false)
662664
enable_integrity_monitoring = lookup(var.node_pools[0], "enable_integrity_monitoring", true)
@@ -1234,6 +1236,7 @@ resource "google_container_node_pool" "windows_pools" {
12341236
{% endif %}
12351237

12361238
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
1239+
storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : []
12371240

12381241
shielded_instance_config {
12391242
enable_secure_boot = lookup(each.value, "enable_secure_boot", false)

autogen/main/versions.tf.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,33 @@ terraform {
2424
required_providers {
2525
google = {
2626
source = "hashicorp/google"
27-
version = ">= 6.33.0, < 7"
27+
version = ">= 6.36.0, < 7"
2828
}
2929
google-beta = {
3030
source = "hashicorp/google-beta"
31-
version = ">= 6.33.0, < 7"
31+
version = ">= 6.36.0, < 7"
3232
}
3333
{% elif beta_cluster and autopilot_cluster %}
3434
required_providers {
3535
google = {
3636
source = "hashicorp/google"
37-
version = ">= 6.33.0, < 7"
37+
version = ">= 6.36.0, < 7"
3838
}
3939
google-beta = {
4040
source = "hashicorp/google-beta"
41-
version = ">= 6.33.0, < 7"
41+
version = ">= 6.36.0, < 7"
4242
}
4343
{% elif autopilot_cluster %}
4444
required_providers {
4545
google = {
4646
source = "hashicorp/google"
47-
version = ">= 6.33.0, < 7"
47+
version = ">= 6.36.0, < 7"
4848
}
4949
{% else %}
5050
required_providers {
5151
google = {
5252
source = "hashicorp/google"
53-
version = ">= 6.33.0, < 7"
53+
version = ">= 6.36.0, < 7"
5454
}
5555
{% endif %}
5656
kubernetes = {

cluster.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ resource "google_container_cluster" "primary" {
504504
metadata = local.node_pools_metadata["all"]
505505

506506

507+
storage_pools = lookup(var.node_pools[0], "storage_pools", null) != null ? [var.node_pools[0].storage_pools] : []
508+
507509
shielded_instance_config {
508510
enable_secure_boot = lookup(var.node_pools[0], "enable_secure_boot", false)
509511
enable_integrity_monitoring = lookup(var.node_pools[0], "enable_integrity_monitoring", true)
@@ -920,6 +922,7 @@ resource "google_container_node_pool" "pools" {
920922
}
921923

922924
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
925+
storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : []
923926

924927
shielded_instance_config {
925928
enable_secure_boot = lookup(each.value, "enable_secure_boot", false)
@@ -1238,6 +1241,7 @@ resource "google_container_node_pool" "windows_pools" {
12381241

12391242

12401243
boot_disk_kms_key = lookup(each.value, "boot_disk_kms_key", "")
1244+
storage_pools = lookup(each.value, "storage_pools", null) != null ? [each.value.storage_pools] : []
12411245

12421246
shielded_instance_config {
12431247
enable_secure_boot = lookup(each.value, "enable_secure_boot", false)

core

Whitespace-only changes.

docs/upgrading_to_v37.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
The v37.0 release of *kubernetes-engine* is a backwards incompatible release.
33

44
### Google Cloud Platform Provider upgrade
5-
The Terraform Kubernetes Engine Module now requires version 6.27 or higher of the Google Cloud Platform Providers.
5+
The Terraform Kubernetes Engine Module now requires version 6.36 or higher of the Google Cloud Platform Providers.
66

77
### Private Cluster DNS Allow External Traffic
88
DNS allow external traffic is now controlled solely by `dns_allow_external_traffic` for private clusters.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
228228
#### Terraform and Plugins
229229

230230
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
231-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.33+
231+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.36+
232232

233233
#### gcloud
234234

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ terraform {
2121
required_providers {
2222
google = {
2323
source = "hashicorp/google"
24-
version = ">= 6.33.0, < 7"
24+
version = ">= 6.36.0, < 7"
2525
}
2626
google-beta = {
2727
source = "hashicorp/google-beta"
28-
version = ">= 6.33.0, < 7"
28+
version = ">= 6.36.0, < 7"
2929
}
3030
kubernetes = {
3131
source = "hashicorp/kubernetes"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
214214
#### Terraform and Plugins
215215

216216
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
217-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.33+
217+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.36+
218218

219219
#### gcloud
220220

0 commit comments

Comments
 (0)