File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1515 */
1616
1717provider "google-beta" {
18- version = " ~> 3.1.0"
18+ version = " >= 3.1.0, <4.0 .0"
1919 region = var. region
2020}
2121
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ The following dependency must be available for SQL Server module:
2424| disk\_ autoresize | Configuration to increase storage size. | bool | ` "true" ` | no |
2525| disk\_ size | The disk size for the master instance. | string | ` "10" ` | no |
2626| disk\_ type | The disk type for the master instance. | string | ` "PD_SSD" ` | no |
27+ | encryption\_ key\_ name | The full path to the encryption key used for the CMEK disk encryption | string | ` "null" ` | no |
2728| ip\_ configuration | The ip configuration for the master instances. | object | ` <map> ` | no |
2829| maintenance\_ window\_ day | The day of week (1-7) for the master instance maintenance. | number | ` "1" ` | no |
2930| 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 @@ -38,12 +38,13 @@ resource "random_password" "root-password" {
3838}
3939
4040resource "google_sql_database_instance" "default" {
41- provider = google- beta
42- project = var. project_id
43- name = var. random_instance_name ? " ${ var . name } -${ random_id . suffix [0 ]. hex } " : var. name
44- database_version = var. database_version
45- region = var. region
46- root_password = coalesce (var. root_password , random_password. root-password . result )
41+ provider = google- beta
42+ project = var. project_id
43+ name = var. random_instance_name ? " ${ var . name } -${ random_id . suffix [0 ]. hex } " : var. name
44+ database_version = var. database_version
45+ region = var. region
46+ encryption_key_name = var. encryption_key_name
47+ root_password = coalesce (var. root_password , random_password. root-password . result )
4748
4849 settings {
4950 tier = var. tier
Original file line number Diff line number Diff line change @@ -224,3 +224,9 @@ variable "module_depends_on" {
224224 type = list (any )
225225 default = []
226226}
227+
228+ variable "encryption_key_name" {
229+ description = " The full path to the encryption key used for the CMEK disk encryption"
230+ type = string
231+ default = null
232+ }
Original file line number Diff line number Diff line change 1717terraform {
1818 required_version = " >= 0.12"
1919 required_providers {
20- google-beta = " >= 3.1 .0"
20+ google-beta = " >= 3.10.0, <4.0 .0"
2121 }
2222}
You can’t perform that action at this time.
0 commit comments