Skip to content

Commit 5c17b2e

Browse files
authored
Merge pull request #217 from Dev25/beta-v2
Add Authenticator Groups
2 parents b5fb648 + 25aed41 commit 5c17b2e

File tree

12 files changed

+51
-0
lines changed

12 files changed

+51
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Extending the adopted spec, each change should have a link to its corresponding
1111

1212
* Support for Intranode Visbiility (IV) and Veritical Pod Autoscaling (VPA) beta features [#216]
1313
* Support for Workload Identity beta feature [#234]
14+
* Support for Google Groups based RBAC beta feature [#217]
1415

1516
## [v4.1.0] 2019-07-24
1617

autogen/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ resource "google_container_cluster" "primary" {
189189
identity_namespace = workload_identity_config.value.identity_namespace
190190
}
191191
}
192+
193+
dynamic "authenticator_groups_config" {
194+
for_each = local.cluster_authenticator_security_group
195+
content {
196+
security_group = authenticator_groups_config.value.security_group
197+
}
198+
}
192199
{% endif %}
193200
}
194201

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 == null ? [] : [{
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,5 +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 = null
390+
}
386391

387392
{% 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 | `"null"` | 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
@@ -176,6 +176,13 @@ resource "google_container_cluster" "primary" {
176176
identity_namespace = workload_identity_config.value.identity_namespace
177177
}
178178
}
179+
180+
dynamic "authenticator_groups_config" {
181+
for_each = local.cluster_authenticator_security_group
182+
content {
183+
security_group = authenticator_groups_config.value.security_group
184+
}
185+
}
179186
}
180187

181188
/******************************************

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 == null ? [] : [{
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,4 +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 = null
387+
}
383388

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 | `"null"` | 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
@@ -171,6 +171,13 @@ resource "google_container_cluster" "primary" {
171171
identity_namespace = workload_identity_config.value.identity_namespace
172172
}
173173
}
174+
175+
dynamic "authenticator_groups_config" {
176+
for_each = local.cluster_authenticator_security_group
177+
content {
178+
security_group = authenticator_groups_config.value.security_group
179+
}
180+
}
174181
}
175182

176183
/******************************************

0 commit comments

Comments
 (0)