-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: expose secret manager rotation config #2530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
941ccd0
7d3c407
1b022b9
44bd33f
48a37db
48e3a4e
a6dbf14
dbcb229
e6320a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,9 +157,16 @@ resource "google_container_cluster" "primary" { | |
| } | ||
|
|
||
| dynamic "secret_manager_config" { | ||
| for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : [] | ||
| for_each = var.secret_manager_addon.enabled ? [var.secret_manager_addon] : [] | ||
| content { | ||
| enabled = secret_manager_config.value | ||
| enabled = secret_manager_config.value.enabled | ||
| dynamic "rotation_config" { | ||
| for_each = secret_manager_config.value.rotation_config != null ? [secret_manager_config.value.rotation_config] : [] | ||
| content { | ||
| enabled = rotation_config.value.enabled | ||
| rotation_interval = rotation_config.value.rotation_interval | ||
|
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,10 +378,18 @@ spec: | |
| description: Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE". | ||
| varType: string | ||
| defaultValue: "" | ||
| - name: enable_secret_manager_addon | ||
| description: Enable the Secret Manager add-on for this cluster | ||
| varType: bool | ||
| defaultValue: false | ||
| - name: secret_manager_addon | ||
| description: Configure the Secret Manager add-on for this cluster | ||
| varType: |- | ||
| object({ | ||
| enabled = bool, | ||
| rotation_config = optional(object({ | ||
| enabled = bool, | ||
| rotation_interval = string | ||
ggprod marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| })) | ||
| }) | ||
|
Comment on lines
+384
to
+390
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| defaultValue: | ||
| enabled: false | ||
| - name: workload_vulnerability_mode | ||
| description: (beta) Sets which mode to use for Protect workload vulnerability scanning feature. Accepted values are DISABLED, BASIC. | ||
| varType: string | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -412,10 +412,16 @@ variable "hpa_profile" { | |
| default = "" | ||
| } | ||
|
|
||
| variable "enable_secret_manager_addon" { | ||
| description = "Enable the Secret Manager add-on for this cluster" | ||
| type = bool | ||
| default = false | ||
| variable "secret_manager_addon" { | ||
| description = "Configure the Secret Manager add-on for this cluster" | ||
| type = object({ | ||
| enabled = bool, | ||
| rotation_config = optional(object({ | ||
| enabled = bool, | ||
| rotation_interval = string | ||
| })) | ||
|
Comment on lines
419
to
422
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| }) | ||
| default = { enabled = false } | ||
| } | ||
|
Comment on lines
+415
to
425
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The formatting of this variable block is inconsistent with the standard References
|
||
|
|
||
| variable "workload_vulnerability_mode" { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -98,7 +98,6 @@ Then perform the following commands on the root folder: | |||||
| | enable\_multi\_networking | Whether multi-networking is enabled for this cluster | `bool` | `null` | no | | ||||||
| | enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no | | ||||||
| | enable\_resource\_consumption\_export | Whether to enable resource consumption metering on this cluster. When enabled, a table will be created in the resource export BigQuery dataset to store resource consumption data. The resulting table can be joined with the resource usage table or with BigQuery billing export. | `bool` | `true` | no | | ||||||
| | enable\_secret\_manager\_addon | Enable the Secret Manager add-on for this cluster | `bool` | `false` | no | | ||||||
| | enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no | | ||||||
| | enable\_vertical\_pod\_autoscaling | Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it | `bool` | `true` | no | | ||||||
| | enterprise\_config | (Optional) Enable or disable GKE enterprise. Valid values are STANDARD and ENTERPRISE. | `string` | `null` | no | | ||||||
|
|
@@ -149,6 +148,7 @@ Then perform the following commands on the root folder: | |||||
| | release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no | | ||||||
| | resource\_manager\_tags | (Optional) - List of resource manager tags applied to autopilot and auto-provisioned node pools. A maximum of 5 tags can be specified. Tags must be in one of these formats: "tagKeys/{tag\_key\_id}"="tagValues/{tag\_value\_id}", "{org\_id}/{tag\_key\_name}"="{tag\_value\_name}", "{project\_id}/{tag\_key\_name}"="{tag\_value\_name}". | `map(string)` | `{}` | no | | ||||||
| | resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no | | ||||||
| | secret\_manager\_addon | Configure the Secret Manager add-on for this cluster | <pre>object({<br> enabled = bool,<br> rotation_config = optional(object({<br> enabled = bool,<br> rotation_interval = string<br> }))<br> })</pre> | <pre>{<br> "enabled": false<br>}</pre> | no | | ||||||
|
||||||
| | secret\_manager\_addon | Configure the Secret Manager add-on for this cluster | <pre>object({<br> enabled = bool,<br> rotation_config = optional(object({<br> enabled = bool,<br> rotation_interval = string<br> }))<br> })</pre> | <pre>{<br> "enabled": false<br>}</pre> | no | | |
| | secret_manager_addon | Configure the Secret Manager add-on for this cluster | <pre>object({<br> enabled = bool,<br> rotation_config = optional(object({<br> enabled = bool,<br> rotation_interval = optional(string)<br> }))<br> })</pre> | <pre>{<br> "enabled": false<br>}</pre> | no | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -157,9 +157,16 @@ resource "google_container_cluster" "primary" { | |
| } | ||
|
|
||
| dynamic "secret_manager_config" { | ||
| for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : [] | ||
| for_each = var.secret_manager_addon.enabled ? [var.secret_manager_addon] : [] | ||
| content { | ||
| enabled = secret_manager_config.value | ||
| enabled = secret_manager_config.value.enabled | ||
| dynamic "rotation_config" { | ||
| for_each = secret_manager_config.value.rotation_config != null ? [secret_manager_config.value.rotation_config] : [] | ||
| content { | ||
| enabled = rotation_config.value.enabled | ||
| rotation_interval = rotation_config.value.rotation_interval | ||
|
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -356,10 +356,18 @@ spec: | |
| description: Enable the Horizontal Pod Autoscaling profile for this cluster. Values are "NONE" and "PERFORMANCE". | ||
| varType: string | ||
| defaultValue: "" | ||
| - name: enable_secret_manager_addon | ||
| description: Enable the Secret Manager add-on for this cluster | ||
| varType: bool | ||
| defaultValue: false | ||
| - name: secret_manager_addon | ||
| description: Configure the Secret Manager add-on for this cluster | ||
| varType: |- | ||
| object({ | ||
| enabled = bool, | ||
| rotation_config = optional(object({ | ||
| enabled = bool, | ||
| rotation_interval = string | ||
|
||
| })) | ||
| }) | ||
|
Comment on lines
+362
to
+368
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| defaultValue: | ||
| enabled: false | ||
| - name: workload_vulnerability_mode | ||
| description: (beta) Sets which mode to use for Protect workload vulnerability scanning feature. Accepted values are DISABLED, BASIC. | ||
| varType: string | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -376,10 +376,16 @@ variable "hpa_profile" { | |
| default = "" | ||
| } | ||
|
|
||
| variable "enable_secret_manager_addon" { | ||
| description = "Enable the Secret Manager add-on for this cluster" | ||
| type = bool | ||
| default = false | ||
| variable "secret_manager_addon" { | ||
| description = "Configure the Secret Manager add-on for this cluster" | ||
| type = object({ | ||
| enabled = bool, | ||
| rotation_config = optional(object({ | ||
| enabled = bool, | ||
| rotation_interval = string | ||
| })) | ||
|
Comment on lines
383
to
386
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| }) | ||
| default = { enabled = false } | ||
| } | ||
|
Comment on lines
+379
to
389
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The formatting of this variable block is inconsistent with the standard References
|
||
|
|
||
| variable "workload_vulnerability_mode" { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.