Skip to content

Commit 6bf1178

Browse files
authored
feat: Add support for KALM config (terraform-google-modules#528)
1 parent fc031fc commit 6bf1178

File tree

22 files changed

+54
-11
lines changed

22 files changed

+54
-11
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ resource "google_container_cluster" "primary" {
160160
enabled = gce_persistent_disk_csi_driver_config.value.enabled
161161
}
162162
}
163+
164+
kalm_config {
165+
enabled = var.kalm_config
166+
}
163167
{% endif %}
164168
}
165169

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,12 @@ variable "gce_pd_csi_driver" {
423423
default = false
424424
}
425425

426+
variable "kalm_config" {
427+
type = bool
428+
description = "(Beta) Whether KALM is enabled for this cluster."
429+
default = false
430+
}
431+
426432
variable "database_encryption" {
427433
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
428434
type = list(object({ state = string, key_name = string }))

autogen/main/versions.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ terraform {
1919

2020
required_providers {
2121
{% if beta_cluster %}
22-
google-beta = ">= 3.19, <4.0.0"
22+
google-beta = ">= 3.21.0, <4.0.0"
2323
{% else %}
2424
google = ">= 3.16, <4.0.0"
2525
{% endif %}

examples/node_pool/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 3.19.0"
22+
version = "~> 3.21.0"
2323
region = var.region
2424
}
2525

examples/node_pool_update_variant_beta/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 3.19.0"
22+
version = "~> 3.21.0"
2323
credentials = file(var.credentials_path)
2424
region = var.region
2525
}

examples/safer_cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ provider "google" {
3434
}
3535

3636
provider "google-beta" {
37-
version = "~> 3.19.0"
37+
version = "~> 3.21.0"
3838
}
3939

4040
module "gke" {

examples/simple_regional_beta/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 3.19.0"
22+
version = "~> 3.21.0"
2323
region = var.region
2424
}
2525

examples/simple_regional_private_beta/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ provider "google" {
2424
}
2525

2626
provider "google-beta" {
27-
version = "~> 3.19.0"
27+
version = "~> 3.21.0"
2828
region = var.region
2929
}
3030

examples/workload_metadata_config/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 3.19.0"
22+
version = "~> 3.21.0"
2323
region = var.region
2424
}
2525

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ Then perform the following commands on the root folder:
196196
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no |
197197
| istio | (Beta) Enable Istio addon | string | `"false"` | no |
198198
| istio\_auth | (Beta) The authentication type between services in Istio. | string | `"AUTH_MUTUAL_TLS"` | no |
199+
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | bool | `"false"` | no |
199200
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
200201
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
201202
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | string | `""` | no |

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ resource "google_container_cluster" "primary" {
145145
enabled = gce_persistent_disk_csi_driver_config.value.enabled
146146
}
147147
}
148+
149+
kalm_config {
150+
enabled = var.kalm_config
151+
}
148152
}
149153

150154
ip_allocation_policy {

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,12 @@ variable "gce_pd_csi_driver" {
416416
default = false
417417
}
418418

419+
variable "kalm_config" {
420+
type = bool
421+
description = "(Beta) Whether KALM is enabled for this cluster."
422+
default = false
423+
}
424+
419425
variable "database_encryption" {
420426
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
421427
type = list(object({ state = string, key_name = string }))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = "~> 0.12.6"
1919

2020
required_providers {
21-
google-beta = ">= 3.19, <4.0.0"
21+
google-beta = ">= 3.21.0, <4.0.0"
2222
}
2323
}

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ Then perform the following commands on the root folder:
174174
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no |
175175
| istio | (Beta) Enable Istio addon | string | `"false"` | no |
176176
| istio\_auth | (Beta) The authentication type between services in Istio. | string | `"AUTH_MUTUAL_TLS"` | no |
177+
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | bool | `"false"` | no |
177178
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
178179
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
179180
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | string | `""` | no |

modules/beta-private-cluster/cluster.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ resource "google_container_cluster" "primary" {
145145
enabled = gce_persistent_disk_csi_driver_config.value.enabled
146146
}
147147
}
148+
149+
kalm_config {
150+
enabled = var.kalm_config
151+
}
148152
}
149153

150154
ip_allocation_policy {

modules/beta-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,12 @@ variable "gce_pd_csi_driver" {
416416
default = false
417417
}
418418

419+
variable "kalm_config" {
420+
type = bool
421+
description = "(Beta) Whether KALM is enabled for this cluster."
422+
default = false
423+
}
424+
419425
variable "database_encryption" {
420426
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
421427
type = list(object({ state = string, key_name = string }))

modules/beta-private-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = "~> 0.12.6"
1919

2020
required_providers {
21-
google-beta = ">= 3.19, <4.0.0"
21+
google-beta = ">= 3.21.0, <4.0.0"
2222
}
2323
}

modules/beta-public-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Then perform the following commands on the root folder:
153153
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | bool | `"false"` | no |
154154
| istio | (Beta) Enable Istio addon | string | `"false"` | no |
155155
| istio\_auth | (Beta) The authentication type between services in Istio. | string | `"AUTH_MUTUAL_TLS"` | no |
156+
| kalm\_config | (Beta) Whether KALM is enabled for this cluster. | bool | `"false"` | no |
156157
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
157158
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com/kubernetes"` | no |
158159
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | string | `""` | no |

modules/beta-public-cluster/cluster.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ resource "google_container_cluster" "primary" {
145145
enabled = gce_persistent_disk_csi_driver_config.value.enabled
146146
}
147147
}
148+
149+
kalm_config {
150+
enabled = var.kalm_config
151+
}
148152
}
149153

150154
ip_allocation_policy {

modules/beta-public-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,12 @@ variable "gce_pd_csi_driver" {
392392
default = false
393393
}
394394

395+
variable "kalm_config" {
396+
type = bool
397+
description = "(Beta) Whether KALM is enabled for this cluster."
398+
default = false
399+
}
400+
395401
variable "database_encryption" {
396402
description = "Application-layer Secrets Encryption settings. The object format is {state = string, key_name = string}. Valid values of state are: \"ENCRYPTED\"; \"DECRYPTED\". key_name is the name of a CloudKMS key."
397403
type = list(object({ state = string, key_name = string }))

modules/beta-public-cluster/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = "~> 0.12.6"
1919

2020
required_providers {
21-
google-beta = ">= 3.19, <4.0.0"
21+
google-beta = ">= 3.21.0, <4.0.0"
2222
}
2323
}

test/setup/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ provider "google" {
2323
}
2424

2525
provider "google-beta" {
26-
version = "2.20.1"
26+
version = "3.21.0"
2727
}

0 commit comments

Comments
 (0)