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
2 changes: 2 additions & 0 deletions modules/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ module "mysql-db" {
| connector\_enforcement | Enforce that clients use the connector library | `bool` | `false` | no |
| create\_timeout | The optional timout that is applied to limit long database creates. | `string` | `"30m"` | no |
| data\_cache\_enabled | Whether data cache is enabled for the instance. Defaults to false. Feature is only available for ENTERPRISE\_PLUS tier and supported database\_versions | `bool` | `false` | no |
| data\_disk\_provisioned\_iops | Provisioned number of I/O operations per second for the data disk. Only used with the HYPERDISK\_BALANCED disk type. | `number` | `null` | no |
| data\_disk\_provisioned\_throughput | Provisioned throughput in MiB per second for the data disk. Only used with the HYPERDISK\_BALANCED disk type. | `number` | `null` | no |
| database\_flags | List of Cloud SQL flags that are applied to the database server. See [more details](https://cloud.google.com/sql/docs/mysql/flags) | <pre>list(object({<br> name = string<br> value = string<br> }))</pre> | `[]` | no |
| database\_integration\_roles | The roles required by default database instance service account for integration with GCP services | `list(string)` | `[]` | no |
| database\_version | The database version to use | `string` | n/a | yes |
Expand Down
3 changes: 3 additions & 0 deletions modules/mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ resource "google_sql_database_instance" "default" {
pricing_plan = var.pricing_plan
user_labels = var.user_labels

data_disk_provisioned_iops = var.data_disk_provisioned_iops
data_disk_provisioned_throughput = var.data_disk_provisioned_throughput

dynamic "connection_pool_config" {
for_each = var.connection_pool_config != null ? [var.connection_pool_config] : []
content {
Expand Down
12 changes: 12 additions & 0 deletions modules/mysql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ variable "disk_type" {
default = "PD_SSD"
}

variable "data_disk_provisioned_iops" {
description = "Provisioned number of I/O operations per second for the data disk. Only used with the HYPERDISK_BALANCED disk type."
type = number
default = null
}

variable "data_disk_provisioned_throughput" {
description = "Provisioned throughput in MiB per second for the data disk. Only used with the HYPERDISK_BALANCED disk type."
type = number
default = null
}

variable "pricing_plan" {
description = "The pricing plan for the master instance."
type = string
Expand Down
Loading