File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,13 @@ resource "google_container_cluster" "primary" {
221
221
{% if beta_cluster %}
222
222
enable_intranode_visibility = var.enable_intranode_visibility
223
223
224
+ dynamic "secret_manager_config" {
225
+ for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
226
+ content {
227
+ enabled = secret_manager_config.value
228
+ }
229
+ }
230
+
224
231
dynamic "pod_security_policy_config" {
225
232
for_each = var.enable_pod_security_policy ? [var.enable_pod_security_policy] : []
226
233
content {
Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ locals {
169
169
cluster_output_pod_security_policy_enabled = google_container_cluster.primary.pod_security_policy_config != null && length(google_container_cluster.primary.pod_security_policy_config) == 1 ? google_container_cluster.primary.pod_security_policy_config[0].enabled : false
170
170
cluster_output_intranode_visbility_enabled = google_container_cluster.primary.enable_intranode_visibility
171
171
cluster_output_identity_service_enabled = google_container_cluster.primary.identity_service_config != null && length(google_container_cluster.primary.identity_service_config) == 1 ? google_container_cluster.primary.identity_service_config[0].enabled : false
172
+ cluster_output_secret_manager_addon_enabled = google_container_cluster.primary.secret_manager_config != null && length(google_container_cluster.primary.secret_manager_config) == 1 ? google_container_cluster.primary.secret_manager_config[0].enabled : false
172
173
173
174
# /BETA features
174
175
{% endif %}
@@ -239,6 +240,7 @@ locals {
239
240
cluster_pod_security_policy_enabled = local.cluster_output_pod_security_policy_enabled
240
241
cluster_intranode_visibility_enabled = local.cluster_output_intranode_visbility_enabled
241
242
cluster_identity_service_enabled = local.cluster_output_identity_service_enabled
243
+ cluster_secret_manager_addon_enabled = local.cluster_output_secret_manager_addon_enabled
242
244
243
245
# /BETA features
244
246
{% endif %}
Original file line number Diff line number Diff line change @@ -233,6 +233,11 @@ output "identity_service_enabled" {
233
233
description = "Whether Identity Service is enabled"
234
234
value = local.cluster_identity_service_enabled
235
235
}
236
+
237
+ output "secret_manager_addon_enabled" {
238
+ description = "Whether Secret Manager add-on is enabled"
239
+ value = local.cluster_secret_manager_addon_enabled
240
+ }
236
241
{% endif %}
237
242
238
243
output "fleet_membership" {
Original file line number Diff line number Diff line change @@ -862,6 +862,12 @@ variable "enable_pod_security_policy" {
862
862
default = false
863
863
}
864
864
865
+ variable "enable_secret_manager_addon" {
866
+ description = "(Beta) Enable the Secret Manager add-on for this cluster"
867
+ type = bool
868
+ default = false
869
+ }
870
+
865
871
variable "sandbox_enabled" {
866
872
type = bool
867
873
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
You can’t perform that action at this time.
0 commit comments