Skip to content

feat(TPG>=6.38)!: bump hpa_profile to GA #2362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ Then perform the following commands on the root folder:
| gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
| hpa\_profile | Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE". | `string` | `""` | no |
| http\_load\_balancing | Enable httpload balancer addon | `bool` | `true` | no |
| identity\_namespace | The workload pool to attach all Kubernetes service accounts to. (Default value of `enabled` automatically sets project-based pool `[project_id].svc.id.goog`) | `string` | `"enabled"` | no |
| initial\_node\_count | The number of nodes to create in this cluster's default node pool. | `number` | `0` | no |
Expand Down Expand Up @@ -418,7 +419,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions autogen/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog

- [Terraform](https://www.terraform.io/downloads.html) 1.3+
{% if beta_cluster %}
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.36+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.38+
{% else %}
- [Terraform Provider for GCP][terraform-provider-google] v6.36+
- [Terraform Provider for GCP][terraform-provider-google] v6.38+
{% endif %}

#### gcloud
Expand Down
2 changes: 0 additions & 2 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,12 @@ resource "google_container_cluster" "primary" {
}
}

{% if beta_cluster %}
dynamic "pod_autoscaling" {
for_each = length(var.hpa_profile) > 0 ? [1] : []
content {
hpa_profile = var.hpa_profile
}
}
{% endif %}

dynamic "enterprise_config" {
for_each = var.enterprise_config != null ? [1] : []
Expand Down
2 changes: 0 additions & 2 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,11 @@ variable "enable_confidential_nodes" {
default = false
}

{% if beta_cluster %}
variable "hpa_profile" {
description = "Enable the Horizontal Pod Autoscaling profile for this cluster. Values are \"NONE\" and \"PERFORMANCE\"."
type = string
default = ""
}
{% endif %}
{% if autopilot_cluster != true %}

variable "enable_gcfs" {
Expand Down
12 changes: 6 additions & 6 deletions autogen/main/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
{% elif beta_cluster and autopilot_cluster %}
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
{% elif autopilot_cluster %}
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
{% else %}
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
{% endif %}
kubernetes = {
Expand Down
6 changes: 6 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "pod_autoscaling" {
for_each = length(var.hpa_profile) > 0 ? [1] : []
content {
hpa_profile = var.hpa_profile
}
}

dynamic "enterprise_config" {
for_each = var.enterprise_config != null ? [1] : []
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrading_to_v37.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
The v37.0 release of *kubernetes-engine* is a backwards incompatible release.

### Google Cloud Platform Provider upgrade
The Terraform Kubernetes Engine Module now requires version 6.36 or higher of the Google Cloud Platform Providers.
The Terraform Kubernetes Engine Module now requires version 6.38 or higher of the Google Cloud Platform Providers.

### Private Cluster DNS Allow External Traffic
DNS allow external traffic is now controlled solely by `dns_allow_external_traffic` for private clusters.
Expand Down
3 changes: 3 additions & 0 deletions metadata.display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ spec:
horizontal_pod_autoscaling:
name: horizontal_pod_autoscaling
title: Horizontal Pod Autoscaling
hpa_profile:
name: hpa_profile
title: Hpa Profile
http_load_balancing:
name: http_load_balancing
title: Http Load Balancing
Expand Down
4 changes: 4 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,10 @@ spec:
description: An optional flag to enable confidential node config.
varType: bool
defaultValue: false
- name: hpa_profile
description: Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE".
varType: string
defaultValue: ""
- name: enable_gcfs
description: Enable image streaming on cluster level.
varType: bool
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions modules/beta-autopilot-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions modules/beta-autopilot-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions modules/beta-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions modules/beta-public-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
4 changes: 2 additions & 2 deletions modules/beta-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
3 changes: 2 additions & 1 deletion modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ Then perform the following commands on the root folder:
| gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
| hpa\_profile | Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE". | `string` | `""` | no |
| http\_load\_balancing | Enable httpload balancer addon | `bool` | `true` | no |
| identity\_namespace | The workload pool to attach all Kubernetes service accounts to. (Default value of `enabled` automatically sets project-based pool `[project_id].svc.id.goog`) | `string` | `"enabled"` | no |
| initial\_node\_count | The number of nodes to create in this cluster's default node pool. | `number` | `0` | no |
Expand Down Expand Up @@ -453,7 +454,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
6 changes: 6 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "pod_autoscaling" {
for_each = length(var.hpa_profile) > 0 ? [1] : []
content {
hpa_profile = var.hpa_profile
}
}

dynamic "enterprise_config" {
for_each = var.enterprise_config != null ? [1] : []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ spec:
horizontal_pod_autoscaling:
name: horizontal_pod_autoscaling
title: Horizontal Pod Autoscaling
hpa_profile:
name: hpa_profile
title: Hpa Profile
http_load_balancing:
name: http_load_balancing
title: Http Load Balancing
Expand Down
4 changes: 4 additions & 0 deletions modules/private-cluster-update-variant/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,10 @@ spec:
description: An optional flag to enable confidential node config.
varType: bool
defaultValue: false
- name: hpa_profile
description: Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE".
varType: string
defaultValue: ""
- name: enable_gcfs
description: Enable image streaming on cluster level.
varType: bool
Expand Down
5 changes: 5 additions & 0 deletions modules/private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,11 @@ variable "enable_confidential_nodes" {
default = false
}

variable "hpa_profile" {
description = "Enable the Horizontal Pod Autoscaling profile for this cluster. Values are \"NONE\" and \"PERFORMANCE\"."
type = string
default = ""
}

variable "enable_gcfs" {
type = bool
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.36.0, < 7"
version = ">= 6.38.0, < 7"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
3 changes: 2 additions & 1 deletion modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Then perform the following commands on the root folder:
| gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
| hpa\_profile | Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE". | `string` | `""` | no |
| http\_load\_balancing | Enable httpload balancer addon | `bool` | `true` | no |
| identity\_namespace | The workload pool to attach all Kubernetes service accounts to. (Default value of `enabled` automatically sets project-based pool `[project_id].svc.id.goog`) | `string` | `"enabled"` | no |
| initial\_node\_count | The number of nodes to create in this cluster's default node pool. | `number` | `0` | no |
Expand Down Expand Up @@ -431,7 +432,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
#### Terraform and Plugins

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

#### gcloud

Expand Down
6 changes: 6 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "pod_autoscaling" {
for_each = length(var.hpa_profile) > 0 ? [1] : []
content {
hpa_profile = var.hpa_profile
}
}

dynamic "enterprise_config" {
for_each = var.enterprise_config != null ? [1] : []
Expand Down
3 changes: 3 additions & 0 deletions modules/private-cluster/metadata.display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ spec:
horizontal_pod_autoscaling:
name: horizontal_pod_autoscaling
title: Horizontal Pod Autoscaling
hpa_profile:
name: hpa_profile
title: Hpa Profile
http_load_balancing:
name: http_load_balancing
title: Http Load Balancing
Expand Down
Loading