Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ Then perform the following commands on the root folder:
| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no |
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |
| rbac\_binding\_config | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. | <pre>object({<br> enable_insecure_binding_system_unauthenticated = optional(bool, null)<br> enable_insecure_binding_system_authenticated = optional(bool, null)<br> })</pre> | <pre>{<br> "enable_insecure_binding_system_authenticated": null,<br> "enable_insecure_binding_system_unauthenticated": null<br>}</pre> | no |
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
Expand Down
8 changes: 8 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "rbac_binding_config" {
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
content {
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
}
}

dynamic "secret_manager_config" {
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
content {
Expand Down
12 changes: 12 additions & 0 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1149,3 +1149,15 @@ variable "ip_endpoints_enabled" {
type = bool
default = null
}

variable "rbac_binding_config" {
type = object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
description = "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created."
default = {
enable_insecure_binding_system_unauthenticated = null
enable_insecure_binding_system_authenticated = null
}
}
12 changes: 6 additions & 6 deletions autogen/main/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
{% elif beta_cluster and autopilot_cluster %}
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
{% elif autopilot_cluster %}
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
{% else %}
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
{% endif %}
kubernetes = {
Expand Down
8 changes: 8 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "rbac_binding_config" {
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
content {
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
}
}

dynamic "secret_manager_config" {
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
content {
Expand Down
12 changes: 11 additions & 1 deletion metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,16 @@ spec:
- name: ip_endpoints_enabled
description: (Optional) Controls whether to allow direct IP access. Defaults to `true`.
varType: bool
- name: rbac_binding_config
description: RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.
varType: |-
object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
defaultValue:
enable_insecure_binding_system_authenticated: null
enable_insecure_binding_system_unauthenticated: null
outputs:
- name: ca_certificate
description: Cluster ca certificate (base64 encoded)
Expand Down Expand Up @@ -826,7 +836,7 @@ spec:
- roles/editor
providerVersions:
- source: hashicorp/google
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/kubernetes
version: ~> 2.10
- source: hashicorp/random
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Then perform the following commands on the root folder:
| private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no |
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |
| rbac\_binding\_config | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. | <pre>object({<br> enable_insecure_binding_system_unauthenticated = optional(bool, null)<br> enable_insecure_binding_system_authenticated = optional(bool, null)<br> })</pre> | <pre>{<br> "enable_insecure_binding_system_authenticated": null,<br> "enable_insecure_binding_system_unauthenticated": null<br>}</pre> | no |
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
Expand Down
8 changes: 8 additions & 0 deletions modules/beta-autopilot-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "rbac_binding_config" {
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
content {
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
}
}

dynamic "secret_manager_config" {
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
content {
Expand Down
14 changes: 12 additions & 2 deletions modules/beta-autopilot-private-cluster/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,16 @@ spec:
- name: ip_endpoints_enabled
description: (Optional) Controls whether to allow direct IP access. Defaults to `true`.
varType: bool
- name: rbac_binding_config
description: RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.
varType: |-
object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
defaultValue:
enable_insecure_binding_system_authenticated: null
enable_insecure_binding_system_unauthenticated: null
outputs:
- name: ca_certificate
description: Cluster ca certificate (base64 encoded)
Expand Down Expand Up @@ -569,9 +579,9 @@ spec:
- roles/editor
providerVersions:
- source: hashicorp/google
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/google-beta
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/kubernetes
version: ~> 2.10
- source: hashicorp/random
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-autopilot-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -662,3 +662,15 @@ variable "ip_endpoints_enabled" {
type = bool
default = null
}

variable "rbac_binding_config" {
type = object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
description = "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created."
default = {
enable_insecure_binding_system_unauthenticated = null
enable_insecure_binding_system_authenticated = null
}
}
4 changes: 2 additions & 2 deletions modules/beta-autopilot-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
1 change: 1 addition & 0 deletions modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Then perform the following commands on the root folder:
| notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no |
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |
| rbac\_binding\_config | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. | <pre>object({<br> enable_insecure_binding_system_unauthenticated = optional(bool, null)<br> enable_insecure_binding_system_authenticated = optional(bool, null)<br> })</pre> | <pre>{<br> "enable_insecure_binding_system_authenticated": null,<br> "enable_insecure_binding_system_unauthenticated": null<br>}</pre> | no |
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
Expand Down
8 changes: 8 additions & 0 deletions modules/beta-autopilot-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "rbac_binding_config" {
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
content {
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
}
}

dynamic "secret_manager_config" {
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
content {
Expand Down
14 changes: 12 additions & 2 deletions modules/beta-autopilot-public-cluster/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,16 @@ spec:
- name: ip_endpoints_enabled
description: (Optional) Controls whether to allow direct IP access. Defaults to `true`.
varType: bool
- name: rbac_binding_config
description: RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.
varType: |-
object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
defaultValue:
enable_insecure_binding_system_authenticated: null
enable_insecure_binding_system_unauthenticated: null
outputs:
- name: ca_certificate
description: Cluster ca certificate (base64 encoded)
Expand Down Expand Up @@ -543,9 +553,9 @@ spec:
- roles/editor
providerVersions:
- source: hashicorp/google
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/google-beta
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/kubernetes
version: ~> 2.10
- source: hashicorp/random
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-autopilot-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -626,3 +626,15 @@ variable "ip_endpoints_enabled" {
type = bool
default = null
}

variable "rbac_binding_config" {
type = object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
description = "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created."
default = {
enable_insecure_binding_system_unauthenticated = null
enable_insecure_binding_system_authenticated = null
}
}
4 changes: 2 additions & 2 deletions modules/beta-autopilot-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ Then perform the following commands on the root folder:
| private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no |
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |
| rbac\_binding\_config | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. | <pre>object({<br> enable_insecure_binding_system_unauthenticated = optional(bool, null)<br> enable_insecure_binding_system_authenticated = optional(bool, null)<br> })</pre> | <pre>{<br> "enable_insecure_binding_system_authenticated": null,<br> "enable_insecure_binding_system_unauthenticated": null<br>}</pre> | no |
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
Expand Down
8 changes: 8 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "rbac_binding_config" {
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
content {
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
}
}

dynamic "secret_manager_config" {
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
content {
Expand Down
14 changes: 12 additions & 2 deletions modules/beta-private-cluster-update-variant/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,16 @@ spec:
- name: ip_endpoints_enabled
description: (Optional) Controls whether to allow direct IP access. Defaults to `true`.
varType: bool
- name: rbac_binding_config
description: RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.
varType: |-
object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
defaultValue:
enable_insecure_binding_system_authenticated: null
enable_insecure_binding_system_unauthenticated: null
outputs:
- name: ca_certificate
description: Cluster ca certificate (base64 encoded)
Expand Down Expand Up @@ -861,9 +871,9 @@ spec:
- roles/editor
providerVersions:
- source: hashicorp/google
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/google-beta
version: ">= 6.42.0, < 8"
version: ">= 6.47.0, < 8"
- source: hashicorp/kubernetes
version: ~> 2.10
- source: hashicorp/random
Expand Down
12 changes: 12 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1075,3 +1075,15 @@ variable "ip_endpoints_enabled" {
type = bool
default = null
}

variable "rbac_binding_config" {
type = object({
enable_insecure_binding_system_unauthenticated = optional(bool, null)
enable_insecure_binding_system_authenticated = optional(bool, null)
})
description = "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created."
default = {
enable_insecure_binding_system_unauthenticated = null
enable_insecure_binding_system_authenticated = null
}
}
4 changes: 2 additions & 2 deletions modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 6.42.0, < 8"
version = ">= 6.47.0, < 8"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
Loading