Skip to content

Commit e5ade9c

Browse files
authored
feat(TPG>=6.41)!: add support performance_monitoring_unit (#2391)
1 parent f8ff8bd commit e5ade9c

File tree

28 files changed

+70
-47
lines changed

28 files changed

+70
-47
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ The node_pools variable takes the following parameters:
364364
| strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE`, `BLUE_GREEN`, or for flex-start and queued provisioning `SHORT_LIVED` | "SURGE" | Optional |
365365
| threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional |
366366
| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional |
367+
| performance_monitoring_unit | Level of Performance Monitoring Unit (PMU) requested. If unset, no access to the PMU is assumed. Values values are: `ARCHITECTURAL`, `STANDARD`, and `ENHANCED` | null | Optional |
367368
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional |
368369
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional |
369370
| node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional |
@@ -429,7 +430,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
429430
#### Terraform and Plugins
430431

431432
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
432-
- [Terraform Provider for GCP][terraform-provider-google] v6.38+
433+
- [Terraform Provider for GCP][terraform-provider-google] v6.41+
433434

434435
#### gcloud
435436

autogen/main/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ The node_pools variable takes the following parameters:
244244
| strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE`, `BLUE_GREEN`, or for flex-start and queued provisioning `SHORT_LIVED` | "SURGE" | Optional |
245245
| threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional |
246246
| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional |
247+
| performance_monitoring_unit | Level of Performance Monitoring Unit (PMU) requested. If unset, no access to the PMU is assumed. Values values are: `ARCHITECTURAL`, `STANDARD`, and `ENHANCED` | null | Optional |
247248
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional |
248249
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional |
249250
| node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional |
@@ -316,9 +317,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
316317

317318
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
318319
{% if beta_cluster %}
319-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.38+
320+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.41+
320321
{% else %}
321-
- [Terraform Provider for GCP][terraform-provider-google] v6.38+
322+
- [Terraform Provider for GCP][terraform-provider-google] v6.41+
322323
{% endif %}
323324

324325
#### gcloud

autogen/main/cluster.tf.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,10 +1165,11 @@ resource "google_container_node_pool" "windows_pools" {
11651165
}
11661166

11671167
dynamic "advanced_machine_features" {
1168-
for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : []
1168+
for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) || lookup(each.value, "performance_monitoring_unit", null) != null ? [1] : []
11691169
content {
11701170
threads_per_core = lookup(each.value, "threads_per_core", 0)
11711171
enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null)
1172+
performance_monitoring_unit = lookup(each.value, "performance_monitoring_unit", null)
11721173
}
11731174
}
11741175

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.38.0, < 7"
27+
version = ">= 6.41.0, < 7"
2828
}
2929
google-beta = {
3030
source = "hashicorp/google-beta"
31-
version = ">= 6.38.0, < 7"
31+
version = ">= 6.41.0, < 7"
3232
}
3333
{% elif beta_cluster and autopilot_cluster %}
3434
required_providers {
3535
google = {
3636
source = "hashicorp/google"
37-
version = ">= 6.38.0, < 7"
37+
version = ">= 6.41.0, < 7"
3838
}
3939
google-beta = {
4040
source = "hashicorp/google-beta"
41-
version = ">= 6.38.0, < 7"
41+
version = ">= 6.41.0, < 7"
4242
}
4343
{% elif autopilot_cluster %}
4444
required_providers {
4545
google = {
4646
source = "hashicorp/google"
47-
version = ">= 6.38.0, < 7"
47+
version = ">= 6.41.0, < 7"
4848
}
4949
{% else %}
5050
required_providers {
5151
google = {
5252
source = "hashicorp/google"
53-
version = ">= 6.38.0, < 7"
53+
version = ">= 6.41.0, < 7"
5454
}
5555
{% endif %}
5656
kubernetes = {

cluster.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,10 +863,11 @@ resource "google_container_node_pool" "pools" {
863863
}
864864

865865
dynamic "advanced_machine_features" {
866-
for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : []
866+
for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) || lookup(each.value, "performance_monitoring_unit", null) != null ? [1] : []
867867
content {
868868
threads_per_core = lookup(each.value, "threads_per_core", 0)
869869
enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null)
870+
performance_monitoring_unit = lookup(each.value, "performance_monitoring_unit", null)
870871
}
871872
}
872873

@@ -1226,10 +1227,11 @@ resource "google_container_node_pool" "windows_pools" {
12261227
}
12271228

12281229
dynamic "advanced_machine_features" {
1229-
for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) ? [1] : []
1230+
for_each = lookup(each.value, "threads_per_core", 0) > 0 || lookup(each.value, "enable_nested_virtualization", false) || lookup(each.value, "performance_monitoring_unit", null) != null ? [1] : []
12301231
content {
12311232
threads_per_core = lookup(each.value, "threads_per_core", 0)
12321233
enable_nested_virtualization = lookup(each.value, "enable_nested_virtualization", null)
1234+
performance_monitoring_unit = lookup(each.value, "performance_monitoring_unit", null)
12331235
}
12341236
}
12351237

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

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

228228
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
229-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.38+
229+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.41+
230230

231231
#### gcloud
232232

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.38.0, < 7"
24+
version = ">= 6.41.0, < 7"
2525
}
2626
google-beta = {
2727
source = "hashicorp/google-beta"
28-
version = ">= 6.38.0, < 7"
28+
version = ">= 6.41.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
@@ -212,7 +212,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
212212
#### Terraform and Plugins
213213

214214
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
215-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.38+
215+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.41+
216216

217217
#### gcloud
218218

modules/beta-autopilot-public-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.38.0, < 7"
24+
version = ">= 6.41.0, < 7"
2525
}
2626
google-beta = {
2727
source = "hashicorp/google-beta"
28-
version = ">= 6.38.0, < 7"
28+
version = ">= 6.41.0, < 7"
2929
}
3030
kubernetes = {
3131
source = "hashicorp/kubernetes"

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ The node_pools variable takes the following parameters:
418418
| strategy | The upgrade stragey to be used for upgrading the nodes. Valid values of state are: `SURGE`, `BLUE_GREEN`, or for flex-start and queued provisioning `SHORT_LIVED` | "SURGE" | Optional |
419419
| threads_per_core | Optional The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | null | Optional |
420420
| enable_nested_virtualization | Whether the node should have nested virtualization | null | Optional |
421+
| performance_monitoring_unit | Level of Performance Monitoring Unit (PMU) requested. If unset, no access to the PMU is assumed. Values values are: `ARCHITECTURAL`, `STANDARD`, and `ENHANCED` | null | Optional |
421422
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. Only works with `SURGE` strategy. | 1 | Optional |
422423
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. Only works with `SURGE` strategy. | 0 | Optional |
423424
| node_pool_soak_duration | Time needed after draining the entire blue pool. After this period, the blue pool will be cleaned up. By default, it is set to one hour (3600 seconds). The maximum length of the soak time is 7 days (604,800 seconds). Only works with `BLUE_GREEN` strategy. | "3600s" | Optional |
@@ -483,7 +484,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
483484
#### Terraform and Plugins
484485

485486
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
486-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.38+
487+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.41+
487488

488489
#### gcloud
489490

0 commit comments

Comments
 (0)