Skip to content

Commit 07e2b8d

Browse files
authored
Merge pull request #273 from kbst/fix-gke-db-encryption
Fix GKE db encryption default to null not false
2 parents feb1f71 + 6e436f0 commit 07e2b8d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

google/_modules/gke/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "google_container_cluster" "current" {
2828
dynamic "database_encryption" {
2929
for_each = var.cluster_database_encryption_key_name != null ? toset([1]) : toset([])
3030
content {
31-
state = "ENCRYPTED"
31+
state = "ENCRYPTED"
3232
key_name = var.cluster_database_encryption_key_name
3333
}
3434
}

google/cluster/configuration.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ locals {
5757
enable_private_nodes = lookup(local.cfg, "enable_private_nodes", true)
5858
master_cidr_block = lookup(local.cfg, "master_cidr_block", "172.16.0.32/28")
5959

60-
cluster_ipv4_cidr_block = lookup(local.cfg, "cluster_ipv4_cidr_block", null)
60+
cluster_ipv4_cidr_block = lookup(local.cfg, "cluster_ipv4_cidr_block", null)
6161
services_ipv4_cidr_block = lookup(local.cfg, "services_ipv4_cidr_block", null)
6262

63-
cluster_database_encryption_key_name = lookup(local.cfg, "cluster_database_encryption_key_name", false)
63+
cluster_database_encryption_key_name = lookup(local.cfg, "cluster_database_encryption_key_name", null)
6464

6565
# by default include cloud_nat when private nodes are enabled
6666
enable_cloud_nat = lookup(local.cfg, "enable_cloud_nat", local.enable_private_nodes)
@@ -75,6 +75,6 @@ locals {
7575
master_authorized_networks_config_cidr_blocks_lookup = lookup(local.cfg, "master_authorized_networks_config_cidr_blocks", null)
7676
master_authorized_networks_config_cidr_blocks = local.master_authorized_networks_config_cidr_blocks_lookup == null ? null : split(",", local.master_authorized_networks_config_cidr_blocks_lookup)
7777

78-
enable_intranode_visibility = lookup(local.cfg, "enable_intranode_visibility", false )
78+
enable_intranode_visibility = lookup(local.cfg, "enable_intranode_visibility", false)
7979
enable_tpu = lookup(local.cfg, "enable_tpu", false)
8080
}

0 commit comments

Comments
 (0)