Skip to content

Commit 8515153

Browse files
authored
Merge branch 'master' into ap/endpoint
2 parents 17e400c + 276cbdb commit 8515153

File tree

5 files changed

+44
-16
lines changed

5 files changed

+44
-16
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,6 @@ resource "google_container_cluster" "primary" {
725725
{% if update_variant %}
726726
locals {
727727
force_node_pool_recreation_resources = [
728-
"disk_size_gb",
729-
"disk_type",
730728
"accelerator_count",
731729
"accelerator_type",
732730
"gpu_partition_size",
@@ -739,15 +737,13 @@ locals {
739737
{% if beta_cluster %}
740738
"local_ssd_ephemeral_count",
741739
{% endif %}
742-
"machine_type",
743740
"placement_policy",
744741
"max_pods_per_node",
745742
"min_cpu_platform",
746743
"pod_range",
747744
"preemptible",
748745
"spot",
749746
"service_account",
750-
"enable_gcfs",
751747
"enable_gvnic",
752748
"boot_disk_kms_key",
753749
"queued_provisioning",

docs/upgrading_to_v35.0.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,47 @@ The Terraform Kubernetes Engine Module now requires version 6 of the Google Clou
66

77
### Private Cluster Sub-Modules Endpoint Output
88
The private cluster sub-modules now return the cluster's private endpoint for the `endpoint` output when the `enable_private_endpoint` argument is `true`, regardless of the `deploy_using_private_endpoint` argument value.
9+
10+
## Update variant random ID keepers updated
11+
12+
The v35.0 release updates the keepers for the update variant modules. This will force a recreation of the nodepools.
13+
14+
To avoid this, it is possible to edit the remote state of the `random_id` resource to add the new attributes.
15+
16+
1. Perform a `terraform plan` as normal, identifying the `random_id` resource(s) changing and the new/removed attributes
17+
```tf
18+
~ keepers = { # forces replacement
19+
- "disk_type" = "" -> null
20+
- "disk_size_gb" = "" -> null
21+
- "machine_type" = "" -> null
22+
- "enable_gcfs" = "" -> null
23+
# (19 unchanged elements hidden)
24+
}
25+
# (2 unchanged attributes hidden)
26+
}
27+
```
28+
2. Pull the remote state locally: `terraform state pull > default.tfstate`
29+
3. Back up the original remote state: `cp default.tfstate original.tfstate`
30+
4. Edit the `random_id` resource(s) to add/remove the attributes from the `terraform plan` step
31+
```diff
32+
"attributes": {
33+
"b64_std": "pool-02-vb4=",
34+
"b64_url": "pool-02-vb4",
35+
"byte_length": 2,
36+
"dec": "pool-02-48574",
37+
"hex": "pool-02-bdbe",
38+
"id": "vb4",
39+
"keepers": {
40+
...
41+
"taints": "",
42+
- "disk_size_gb": "",
43+
- "enable_gcfs": "",
44+
- "machine_type": "",
45+
- "disk_type": "",
46+
},
47+
"prefix": "pool-02-"
48+
}
49+
```
50+
1. Bump the serial number at the top
51+
2. Push the modified state to the remote `terraform state push default.tfstate`
52+
3. Confirm the `random_id` resource(s) no longer changes (or the corresponding `nodepool`) in a `terraform plan`

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,6 @@ resource "google_container_cluster" "primary" {
619619
*****************************************/
620620
locals {
621621
force_node_pool_recreation_resources = [
622-
"disk_size_gb",
623-
"disk_type",
624622
"accelerator_count",
625623
"accelerator_type",
626624
"gpu_partition_size",
@@ -631,15 +629,13 @@ locals {
631629
"enable_integrity_monitoring",
632630
"local_ssd_count",
633631
"local_ssd_ephemeral_count",
634-
"machine_type",
635632
"placement_policy",
636633
"max_pods_per_node",
637634
"min_cpu_platform",
638635
"pod_range",
639636
"preemptible",
640637
"spot",
641638
"service_account",
642-
"enable_gcfs",
643639
"enable_gvnic",
644640
"boot_disk_kms_key",
645641
"queued_provisioning",

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,6 @@ resource "google_container_cluster" "primary" {
589589
*****************************************/
590590
locals {
591591
force_node_pool_recreation_resources = [
592-
"disk_size_gb",
593-
"disk_type",
594592
"accelerator_count",
595593
"accelerator_type",
596594
"gpu_partition_size",
@@ -601,15 +599,13 @@ locals {
601599
"enable_integrity_monitoring",
602600
"local_ssd_count",
603601
"local_ssd_ephemeral_count",
604-
"machine_type",
605602
"placement_policy",
606603
"max_pods_per_node",
607604
"min_cpu_platform",
608605
"pod_range",
609606
"preemptible",
610607
"spot",
611608
"service_account",
612-
"enable_gcfs",
613609
"enable_gvnic",
614610
"boot_disk_kms_key",
615611
"queued_provisioning",

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@ resource "google_container_cluster" "primary" {
572572
*****************************************/
573573
locals {
574574
force_node_pool_recreation_resources = [
575-
"disk_size_gb",
576-
"disk_type",
577575
"accelerator_count",
578576
"accelerator_type",
579577
"gpu_partition_size",
@@ -583,15 +581,13 @@ locals {
583581
"enable_secure_boot",
584582
"enable_integrity_monitoring",
585583
"local_ssd_count",
586-
"machine_type",
587584
"placement_policy",
588585
"max_pods_per_node",
589586
"min_cpu_platform",
590587
"pod_range",
591588
"preemptible",
592589
"spot",
593590
"service_account",
594-
"enable_gcfs",
595591
"enable_gvnic",
596592
"boot_disk_kms_key",
597593
"queued_provisioning",

0 commit comments

Comments
 (0)