diff --git a/README.md b/README.md index 36f500c5ec..0c3996c810 100644 --- a/README.md +++ b/README.md @@ -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 | @@ -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 diff --git a/autogen/main/README.md b/autogen/main/README.md index 8475543d0a..6490c6fc81 100644 --- a/autogen/main/README.md +++ b/autogen/main/README.md @@ -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 diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index b532c48a4e..b921e8e7f4 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -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] : [] diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index 38bd8d4f73..0dd8b1743c 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -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" { diff --git a/autogen/main/versions.tf.tmpl b/autogen/main/versions.tf.tmpl index 8cb2d29b37..6da759bdbe 100644 --- a/autogen/main/versions.tf.tmpl +++ b/autogen/main/versions.tf.tmpl @@ -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 = { diff --git a/cluster.tf b/cluster.tf index 6c1dcd9661..f5b2c1130b 100644 --- a/cluster.tf +++ b/cluster.tf @@ -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] : [] diff --git a/docs/upgrading_to_v37.0.md b/docs/upgrading_to_v37.0.md index 18323d5fcc..c07d31d6f7 100644 --- a/docs/upgrading_to_v37.0.md +++ b/docs/upgrading_to_v37.0.md @@ -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. diff --git a/metadata.display.yaml b/metadata.display.yaml index 254e6bc43a..c7781354d4 100644 --- a/metadata.display.yaml +++ b/metadata.display.yaml @@ -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 diff --git a/metadata.yaml b/metadata.yaml index 4dcdf5100e..675a4a7d0b 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -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 diff --git a/modules/beta-autopilot-private-cluster/README.md b/modules/beta-autopilot-private-cluster/README.md index 1c244e7320..609149596f 100644 --- a/modules/beta-autopilot-private-cluster/README.md +++ b/modules/beta-autopilot-private-cluster/README.md @@ -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 diff --git a/modules/beta-autopilot-private-cluster/versions.tf b/modules/beta-autopilot-private-cluster/versions.tf index 41eadff89f..5dfa683667 100644 --- a/modules/beta-autopilot-private-cluster/versions.tf +++ b/modules/beta-autopilot-private-cluster/versions.tf @@ -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" diff --git a/modules/beta-autopilot-public-cluster/README.md b/modules/beta-autopilot-public-cluster/README.md index 26d0446438..a43c05d0b8 100644 --- a/modules/beta-autopilot-public-cluster/README.md +++ b/modules/beta-autopilot-public-cluster/README.md @@ -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 diff --git a/modules/beta-autopilot-public-cluster/versions.tf b/modules/beta-autopilot-public-cluster/versions.tf index fa2d6d2a8a..1f45947744 100644 --- a/modules/beta-autopilot-public-cluster/versions.tf +++ b/modules/beta-autopilot-public-cluster/versions.tf @@ -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" diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index 5b4c626bbd..11b38b7fb4 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -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 diff --git a/modules/beta-private-cluster-update-variant/versions.tf b/modules/beta-private-cluster-update-variant/versions.tf index 9164ec6042..3f1d57ee4d 100644 --- a/modules/beta-private-cluster-update-variant/versions.tf +++ b/modules/beta-private-cluster-update-variant/versions.tf @@ -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" diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index cb94d90c5c..22a7d35409 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -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 diff --git a/modules/beta-private-cluster/versions.tf b/modules/beta-private-cluster/versions.tf index 8c98fbc341..ad972f02b6 100644 --- a/modules/beta-private-cluster/versions.tf +++ b/modules/beta-private-cluster/versions.tf @@ -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" diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index 15d1bae5cd..a11fe9c053 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -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 diff --git a/modules/beta-public-cluster-update-variant/versions.tf b/modules/beta-public-cluster-update-variant/versions.tf index 96c95a8016..1618cf7978 100644 --- a/modules/beta-public-cluster-update-variant/versions.tf +++ b/modules/beta-public-cluster-update-variant/versions.tf @@ -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" diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 0ff3cab8f3..35388d6e74 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -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 diff --git a/modules/beta-public-cluster/versions.tf b/modules/beta-public-cluster/versions.tf index c5de9b28d7..694f49a7ed 100644 --- a/modules/beta-public-cluster/versions.tf +++ b/modules/beta-public-cluster/versions.tf @@ -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" diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index b26e5b1475..ed483e56d1 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -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 | @@ -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 diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index ddb4243cd8..520853469c 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -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] : [] diff --git a/modules/private-cluster-update-variant/metadata.display.yaml b/modules/private-cluster-update-variant/metadata.display.yaml index 0db8c69f32..5be741d64e 100644 --- a/modules/private-cluster-update-variant/metadata.display.yaml +++ b/modules/private-cluster-update-variant/metadata.display.yaml @@ -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 diff --git a/modules/private-cluster-update-variant/metadata.yaml b/modules/private-cluster-update-variant/metadata.yaml index b5537c1de4..43298ca59b 100644 --- a/modules/private-cluster-update-variant/metadata.yaml +++ b/modules/private-cluster-update-variant/metadata.yaml @@ -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 diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index b436e38ce7..8c3d045661 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -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 diff --git a/modules/private-cluster-update-variant/versions.tf b/modules/private-cluster-update-variant/versions.tf index f2c127ae56..a794d44f91 100644 --- a/modules/private-cluster-update-variant/versions.tf +++ b/modules/private-cluster-update-variant/versions.tf @@ -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" diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 2a5ac8c0d6..863ebbf486 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -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 | @@ -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 diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 7924981da0..8f5066778d 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -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] : [] diff --git a/modules/private-cluster/metadata.display.yaml b/modules/private-cluster/metadata.display.yaml index a65ec8efcd..f4f088055b 100644 --- a/modules/private-cluster/metadata.display.yaml +++ b/modules/private-cluster/metadata.display.yaml @@ -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 diff --git a/modules/private-cluster/metadata.yaml b/modules/private-cluster/metadata.yaml index 4b09ac8976..d2f33f09e4 100644 --- a/modules/private-cluster/metadata.yaml +++ b/modules/private-cluster/metadata.yaml @@ -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 diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index b436e38ce7..8c3d045661 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -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 diff --git a/modules/private-cluster/versions.tf b/modules/private-cluster/versions.tf index 842e111401..301d5477ba 100644 --- a/modules/private-cluster/versions.tf +++ b/modules/private-cluster/versions.tf @@ -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" diff --git a/variables.tf b/variables.tf index 11d00f8334..c9ed63de29 100644 --- a/variables.tf +++ b/variables.tf @@ -568,6 +568,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 diff --git a/versions.tf b/versions.tf index 9c0eee0494..d2caf605e9 100644 --- a/versions.tf +++ b/versions.tf @@ -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"