File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq
2626| enable\_ default\_ db | Enable or disable the creation of the default database | bool | ` "true" ` | no |
2727| enable\_ default\_ user | Enable or disable the creation of the default user | bool | ` "true" ` | no |
2828| encryption\_ key\_ name | The full path to the encryption key used for the CMEK disk encryption | string | ` "null" ` | no |
29+ | insights\_ config | The insights_config settings for the database. | object | ` "null" ` | no |
2930| ip\_ configuration | The ip configuration for the master instances. | object | ` <map> ` | no |
3031| maintenance\_ window\_ day | The day of week (1-7) for the master instance maintenance. | number | ` "1" ` | no |
3132| maintenance\_ window\_ hour | The hour of day (0-23) maintenance window for the master instance maintenance. | number | ` "23" ` | no |
Original file line number Diff line number Diff line change @@ -75,6 +75,16 @@ resource "google_sql_database_instance" "default" {
7575 }
7676 }
7777 }
78+ dynamic "insights_config" {
79+ for_each = var. insights_config != null ? [var . insights_config ] : []
80+
81+ content {
82+ query_insights_enabled = true
83+ query_string_length = lookup (insights_config. value , " query_string_length" , 1024 )
84+ record_application_tags = lookup (insights_config. value , " record_application_tags" , false )
85+ record_client_address = lookup (insights_config. value , " record_client_address" , false )
86+ }
87+ }
7888
7989 disk_autoresize = var. disk_autoresize
8090 disk_size = var. disk_size
Original file line number Diff line number Diff line change @@ -138,6 +138,16 @@ variable "backup_configuration" {
138138 }
139139}
140140
141+ variable "insights_config" {
142+ description = " The insights_config settings for the database."
143+ type = object ({
144+ query_string_length = number
145+ record_application_tags = bool
146+ record_client_address = bool
147+ })
148+ default = null
149+ }
150+
141151variable "ip_configuration" {
142152 description = " The ip configuration for the master instances."
143153 type = object ({
You can’t perform that action at this time.
0 commit comments