Skip to content

Commit 09d34fe

Browse files
committed
support enabling multi networking
1 parent 822e8e0 commit 09d34fe

File tree

12 files changed

+68
-12
lines changed

12 files changed

+68
-12
lines changed

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ resource "google_container_cluster" "primary" {
129129

130130
networking_mode = "VPC_NATIVE"
131131

132+
enable_multi_networking = var.enable_multi_networking
133+
132134
protect_config {
133135
workload_config {
134136
audit_mode = var.workload_config_audit_mode

modules/beta-autopilot-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,3 +416,9 @@ variable "timeouts" {
416416
}
417417
}
418418

419+
variable "enable_multi_networking" {
420+
default = false
421+
type = bool
422+
description = "Enable multi NIC support."
423+
}
424+

modules/beta-autopilot-public-cluster/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ resource "google_container_cluster" "primary" {
129129

130130
networking_mode = "VPC_NATIVE"
131131

132+
enable_multi_networking = var.enable_multi_networking
133+
132134
protect_config {
133135
workload_config {
134136
audit_mode = var.workload_config_audit_mode

modules/beta-autopilot-public-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,3 +386,9 @@ variable "timeouts" {
386386
}
387387
}
388388

389+
variable "enable_multi_networking" {
390+
default = false
391+
type = bool
392+
description = "Enable multi NIC support."
393+
}
394+

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ resource "google_container_cluster" "primary" {
260260

261261
networking_mode = "VPC_NATIVE"
262262

263+
enable_multi_networking = var.enable_multi_networking
264+
263265
protect_config {
264266
workload_config {
265267
audit_mode = var.workload_config_audit_mode

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,3 +740,9 @@ variable "enable_identity_service" {
740740
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
741741
default = false
742742
}
743+
744+
variable "enable_multi_networking" {
745+
default = false
746+
type = bool
747+
description = "Enable multi NIC support."
748+
}

modules/beta-private-cluster/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ resource "google_container_cluster" "primary" {
260260

261261
networking_mode = "VPC_NATIVE"
262262

263+
enable_multi_networking = var.enable_multi_networking
264+
263265
protect_config {
264266
workload_config {
265267
audit_mode = var.workload_config_audit_mode

modules/beta-private-cluster/variables.tf

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ variable "shadow_firewall_rules_log_config" {
496496
metadata = string
497497
})
498498
description = "The log_config for shadow firewall rules. You can set this variable to `null` to disable logging."
499-
default = {
499+
default = {
500500
metadata = "INCLUDE_ALL_METADATA"
501501
}
502502
}
@@ -581,10 +581,12 @@ variable "database_encryption" {
581581
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."
582582
type = list(object({ state = string, key_name = string }))
583583

584-
default = [{
585-
state = "DECRYPTED"
586-
key_name = ""
587-
}]
584+
default = [
585+
{
586+
state = "DECRYPTED"
587+
key_name = ""
588+
}
589+
]
588590
}
589591

590592
variable "enable_shielded_nodes" {
@@ -605,7 +607,9 @@ variable "node_metadata" {
605607
type = string
606608

607609
validation {
608-
condition = contains(["GKE_METADATA", "GCE_METADATA", "UNSPECIFIED", "GKE_METADATA_SERVER", "EXPOSE"], var.node_metadata)
610+
condition = contains([
611+
"GKE_METADATA", "GCE_METADATA", "UNSPECIFIED", "GKE_METADATA_SERVER", "EXPOSE"
612+
], var.node_metadata)
609613
error_message = "The node_metadata value must be one of GKE_METADATA, GCE_METADATA, UNSPECIFIED, GKE_METADATA_SERVER or EXPOSE."
610614
}
611615
}
@@ -740,3 +744,9 @@ variable "enable_identity_service" {
740744
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
741745
default = false
742746
}
747+
748+
variable "enable_multi_networking" {
749+
default = false
750+
type = bool
751+
description = "Enable multi NIC support."
752+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ resource "google_container_cluster" "primary" {
260260

261261
networking_mode = "VPC_NATIVE"
262262

263+
enable_multi_networking = var.enable_multi_networking
264+
263265
protect_config {
264266
workload_config {
265267
audit_mode = var.workload_config_audit_mode

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,3 +710,9 @@ variable "enable_identity_service" {
710710
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
711711
default = false
712712
}
713+
714+
variable "enable_multi_networking" {
715+
default = false
716+
type = bool
717+
description = "Enable multi NIC support."
718+
}

modules/beta-public-cluster/cluster.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ resource "google_container_cluster" "primary" {
260260

261261
networking_mode = "VPC_NATIVE"
262262

263+
enable_multi_networking = var.enable_multi_networking
264+
263265
protect_config {
264266
workload_config {
265267
audit_mode = var.workload_config_audit_mode

modules/beta-public-cluster/variables.tf

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ variable "shadow_firewall_rules_log_config" {
466466
metadata = string
467467
})
468468
description = "The log_config for shadow firewall rules. You can set this variable to `null` to disable logging."
469-
default = {
469+
default = {
470470
metadata = "INCLUDE_ALL_METADATA"
471471
}
472472
}
@@ -551,10 +551,12 @@ variable "database_encryption" {
551551
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."
552552
type = list(object({ state = string, key_name = string }))
553553

554-
default = [{
555-
state = "DECRYPTED"
556-
key_name = ""
557-
}]
554+
default = [
555+
{
556+
state = "DECRYPTED"
557+
key_name = ""
558+
}
559+
]
558560
}
559561

560562
variable "enable_shielded_nodes" {
@@ -575,7 +577,9 @@ variable "node_metadata" {
575577
type = string
576578

577579
validation {
578-
condition = contains(["GKE_METADATA", "GCE_METADATA", "UNSPECIFIED", "GKE_METADATA_SERVER", "EXPOSE"], var.node_metadata)
580+
condition = contains([
581+
"GKE_METADATA", "GCE_METADATA", "UNSPECIFIED", "GKE_METADATA_SERVER", "EXPOSE"
582+
], var.node_metadata)
579583
error_message = "The node_metadata value must be one of GKE_METADATA, GCE_METADATA, UNSPECIFIED, GKE_METADATA_SERVER or EXPOSE."
580584
}
581585
}
@@ -710,3 +714,9 @@ variable "enable_identity_service" {
710714
description = "Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
711715
default = false
712716
}
717+
718+
variable "enable_multi_networking" {
719+
default = false
720+
type = bool
721+
description = "Enable multi NIC support."
722+
}

0 commit comments

Comments
 (0)