File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,17 @@ Type: `bool`
173
173
174
174
Default: ` true `
175
175
176
+ ### database\_ storage\_ io\_ scaling\_ enabled
177
+
178
+ Description: Enables IOPS auto scaling. If true, database\_ storage\_ iops will be ignored
179
+
180
+ Type: ` bool `
181
+
182
+ Default: ` false `
183
+
176
184
### database\_ storage\_ iops
177
185
178
- Description: IO operations per second
186
+ Description: IO operations per second. If database \_ storage \_ io \_ scaling \_ enabled is true, this variable will be ignored
179
187
180
188
Type: ` number `
181
189
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ resource "azurerm_mysql_flexible_server" "server" {
6
6
administrator_password = var. admin_password
7
7
sku_name = var. database_host_sku
8
8
storage {
9
- size_gb = var. database_storage_size
10
- auto_grow_enabled = var. database_storage_autogrow
11
- iops = var. database_storage_iops
9
+ size_gb = var. database_storage_size
10
+ auto_grow_enabled = var. database_storage_autogrow
11
+ iops = var. database_storage_io_scaling_enabled != true ? var. database_storage_iops : null
12
+ io_scaling_enabled = var. database_storage_io_scaling_enabled
12
13
}
13
14
version = var. database_version
14
15
backup_retention_days = var. backup_retention_days
Original file line number Diff line number Diff line change @@ -87,7 +87,13 @@ variable "database_storage_autogrow" {
87
87
variable "database_storage_iops" {
88
88
type = number
89
89
default = 3600
90
- description = " IO operations per second"
90
+ description = " IO operations per second. If database_storage_io_scaling_enabled is true, this variable will be ignored"
91
+ }
92
+
93
+ variable "database_storage_io_scaling_enabled" {
94
+ type = bool
95
+ default = false
96
+ description = " Enables IOPS auto scaling. If true, database_storage_iops will be ignored"
91
97
}
92
98
93
99
variable "allowed_ips" {
You can’t perform that action at this time.
0 commit comments