Skip to content

Commit 7f9559c

Browse files
authored
Merge branch 'master' into add_storage_viewer_role_to_sa
2 parents 31cb015 + ca1788c commit 7f9559c

File tree

27 files changed

+112
-36
lines changed

27 files changed

+112
-36
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Extending the adopted spec, each change should have a link to its corresponding
99
## [Unreleased]
1010
### Added
1111

12-
* Added `grant_registry_access` variable to grant `roles/storage.objectViewer` to created SA [#236]
13-
12+
* Added `grant_registry_access` variable to grant Container Registry access to created SA [#236]
1413
* Support for Intranode Visbiility (IV) and Veritical Pod Autoscaling (VPA) beta features [#216]
1514
* Support for Workload Identity beta feature [#234]
15+
* Support for Google Groups based RBAC beta feature [#217]
1616

1717
## [v4.1.0] 2019-07-24
1818

@@ -171,6 +171,8 @@ Extending the adopted spec, each change should have a link to its corresponding
171171
[v0.2.0]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/compare/v0.1.0...v0.2.0
172172

173173
[#236]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/236
174+
[#217]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/217
175+
[#234]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/234
174176
[#216]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/216
175177
[#214]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/214
176178
[#210]: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/pull/210

autogen/cluster.tf

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,19 @@ resource "google_container_cluster" "primary" {
182182
}
183183
}
184184

185-
workload_identity_config {
186-
identity_namespace = var.identity_namespace
185+
dynamic "workload_identity_config" {
186+
for_each = local.cluster_workload_identity_config
187+
188+
content {
189+
identity_namespace = workload_identity_config.value.identity_namespace
190+
}
191+
}
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+
}
187198
}
188199
{% endif %}
189200
}

autogen/main.tf

Lines changed: 7 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
@@ -136,6 +140,9 @@ locals {
136140
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
137141
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
138142
cluster_vertical_pod_autoscaling_enabled = local.cluster_output_vertical_pod_autoscaling_enabled
143+
cluster_workload_identity_config = var.identity_namespace == "" ? [] : [{
144+
identity_namespace = var.identity_namespace
145+
}]
139146
# /BETA features
140147
{% endif %}
141148
}

autogen/variables.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,15 @@ variable "enable_intranode_visibility" {
384384
}
385385

386386
variable "identity_namespace" {
387-
type = string
388387
description = "Workload Identity namespace"
388+
type = string
389389
default = ""
390390
}
391391

392+
variable "authenticator_security_group" {
393+
type = string
394+
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]"
395+
default = null
396+
}
397+
392398
{% endif %}

examples/deploy_service/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.9.0"
22+
version = "~> 2.12.0"
2323
region = var.region
2424
}
2525

2626
provider "google-beta" {
27-
version = "~> 2.9.0"
27+
version = "~> 2.12.0"
2828
region = var.region
2929
}
3030

examples/disable_client_cert/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.9.0"
22+
version = "~> 2.12.0"
2323
region = var.region
2424
}
2525

2626
provider "google-beta" {
27-
version = "~> 2.9.0"
27+
version = "~> 2.12.0"
2828
region = var.region
2929
}
3030

examples/node_pool/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.9.0"
22+
version = "~> 2.12.0"
2323
region = var.region
2424
}
2525

2626
provider "google-beta" {
27-
version = "~> 2.9.0"
27+
version = "~> 2.12.0"
2828
region = var.region
2929
}
3030

examples/shared_vpc/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.9.0"
22+
version = "~> 2.12.0"
2323
region = var.region
2424
}
2525

2626
provider "google-beta" {
27-
version = "~> 2.9.0"
27+
version = "~> 2.12.0"
2828
region = var.region
2929
}
3030

examples/simple_regional/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.9.0"
22+
version = "~> 2.12.0"
2323
region = var.region
2424
}
2525

2626
provider "google-beta" {
27-
version = "~> 2.9.0"
27+
version = "~> 2.12.0"
2828
region = var.region
2929
}
3030

examples/simple_regional_beta/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ locals {
1919
}
2020

2121
provider "google" {
22-
version = "~> 2.9.0"
22+
version = "~> 2.12.0"
2323
credentials = file(var.credentials_path)
2424
region = var.region
2525
}
2626

2727
provider "google-beta" {
28-
version = "~> 2.9.0"
28+
version = "~> 2.12.0"
2929
credentials = file(var.credentials_path)
3030
region = var.region
3131
}

0 commit comments

Comments
 (0)