Skip to content

Commit 24c4ed4

Browse files
committed
enable_mesh_certificates for safer-cluster
1 parent 622c2f6 commit 24c4ed4

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ resource "google_container_cluster" "primary" {
516516
}
517517
{% endif %}
518518

519-
520519
dynamic "authenticator_groups_config" {
521520
for_each = local.cluster_authenticator_security_group
522521
content {

autogen/main/variables.tf.tmpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,14 @@ variable "identity_namespace" {
462462
default = "enabled"
463463
}
464464

465+
{% if autopilot_cluster != true %}
466+
variable "enable_mesh_certificates" {
467+
type = bool
468+
default = false
469+
description = "Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity."
470+
}
471+
{% endif %}
472+
465473
variable "release_channel" {
466474
type = string
467475
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
@@ -753,7 +761,6 @@ variable "enable_pod_security_policy" {
753761
default = false
754762
}
755763

756-
757764
variable "enable_l4_ilb_subsetting" {
758765
type = bool
759766
description = "Enable L4 ILB Subsetting on the cluster"
@@ -777,13 +784,6 @@ variable "enable_identity_service" {
777784
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
778785
default = false
779786
}
780-
781-
782-
variable "enable_mesh_certificates" {
783-
type = bool
784-
default = false
785-
description = "Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity."
786-
}
787787
{% endif %}
788788
{% endif %}
789789

autogen/safer-cluster/main.tf.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ module "gke" {
185185
// We enable Workload Identity by default.
186186
identity_namespace = "${var.project_id}.svc.id.goog"
187187

188+
// Enabling mesh certificates requires Workload Identity
189+
enable_mesh_certificates = var.enable_mesh_certificates
190+
188191
authenticator_security_group = var.authenticator_security_group
189192

190193
enable_shielded_nodes = var.enable_shielded_nodes

autogen/safer-cluster/outputs.tf.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,8 @@ output "peering_name" {
122122
description = "The name of the peering between this cluster and the Google owned VPC."
123123
value = module.gke.peering_name
124124
}
125+
126+
output "enable_mesh_certificates" {
127+
description = "Mesh certificate configuration value"
128+
value = var.enable_mesh_certificates
129+
}

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,3 +484,9 @@ variable "timeouts" {
484484
error_message = "Only create, update, delete timeouts can be specified."
485485
}
486486
}
487+
488+
variable "enable_mesh_certificates" {
489+
type = bool
490+
default = false
491+
description = "Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity."
492+
}

0 commit comments

Comments
 (0)