Skip to content

Commit c277e7e

Browse files
committed
Add authenticator_security_group
1 parent 90efdc3 commit c277e7e

File tree

11 files changed

+53
-0
lines changed

11 files changed

+53
-0
lines changed

autogen/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ resource "google_container_cluster" "primary" {
185185
workload_identity_config {
186186
identity_namespace = var.identity_namespace
187187
}
188+
189+
dynamic "authenticator_groups_config" {
190+
for_each = local.cluster_authenticator_security_group
191+
content {
192+
security_group = authenticator_groups_config.value.security_group
193+
}
194+
}
188195
{% endif %}
189196
}
190197

autogen/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ locals {
7171
node_metadata = var.node_metadata
7272
}]
7373

74+
cluster_authenticator_security_group = var.authenticator_security_group == "" ? [] : [{
75+
security_group = var.authenticator_security_group
76+
}]
77+
7478
{% endif %}
7579

7680
cluster_output_name = google_container_cluster.primary.name

autogen/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,4 +383,10 @@ variable "identity_namespace" {
383383
default = ""
384384
}
385385

386+
variable "authenticator_security_group" {
387+
type = string
388+
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected]"
389+
default = ""
390+
}
391+
386392
{% endif %}

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
136136

137137
| Name | Description | Type | Default | Required |
138138
|------|-------------|:----:|:-----:|:-----:|
139+
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | string | `""` | no |
139140
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
140141
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
141142
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |

modules/beta-private-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ resource "google_container_cluster" "primary" {
172172
workload_identity_config {
173173
identity_namespace = var.identity_namespace
174174
}
175+
176+
dynamic "authenticator_groups_config" {
177+
for_each = local.cluster_authenticator_security_group
178+
content {
179+
security_group = authenticator_groups_config.value.security_group
180+
}
181+
}
175182
}
176183

177184
/******************************************

modules/beta-private-cluster/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ locals {
6666
node_metadata = var.node_metadata
6767
}]
6868

69+
cluster_authenticator_security_group = var.authenticator_security_group == "" ? [] : [{
70+
security_group = var.authenticator_security_group
71+
}]
72+
6973

7074
cluster_output_name = google_container_cluster.primary.name
7175
cluster_output_location = google_container_cluster.primary.location

modules/beta-private-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,9 @@ variable "identity_namespace" {
380380
default = ""
381381
}
382382

383+
variable "authenticator_security_group" {
384+
type = string
385+
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected]"
386+
default = ""
387+
}
388+

modules/beta-public-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
131131

132132
| Name | Description | Type | Default | Required |
133133
|------|-------------|:----:|:-----:|:-----:|
134+
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | string | `""` | no |
134135
| basic\_auth\_password | The password to be used with Basic Authentication. | string | `""` | no |
135136
| basic\_auth\_username | The username to be used with Basic Authentication. An empty value will disable Basic Authentication, which is the recommended configuration. | string | `""` | no |
136137
| cloudrun | (Beta) Enable CloudRun addon | string | `"false"` | no |

modules/beta-public-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ resource "google_container_cluster" "primary" {
167167
workload_identity_config {
168168
identity_namespace = var.identity_namespace
169169
}
170+
171+
dynamic "authenticator_groups_config" {
172+
for_each = local.cluster_authenticator_security_group
173+
content {
174+
security_group = authenticator_groups_config.value.security_group
175+
}
176+
}
170177
}
171178

172179
/******************************************

modules/beta-public-cluster/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ locals {
6666
node_metadata = var.node_metadata
6767
}]
6868

69+
cluster_authenticator_security_group = var.authenticator_security_group == "" ? [] : [{
70+
security_group = var.authenticator_security_group
71+
}]
72+
6973

7074
cluster_output_name = google_container_cluster.primary.name
7175
cluster_output_location = google_container_cluster.primary.location

modules/beta-public-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,3 +356,9 @@ variable "identity_namespace" {
356356
default = ""
357357
}
358358

359+
variable "authenticator_security_group" {
360+
type = string
361+
description = "The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected]"
362+
default = ""
363+
}
364+

0 commit comments

Comments
 (0)