Skip to content

Commit 3c4b504

Browse files
j8rg-awmalik
andauthored
feat: Make MySQL CloudSQL zone optional (#572)
Co-authored-by: Awais Malik <[email protected]>
1 parent 611edfd commit 3c4b504

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

modules/mysql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq
6363
| user\_labels | The key/value labels for the master instances. | `map(string)` | `{}` | no |
6464
| user\_name | The name of the default user | `string` | `"default"` | no |
6565
| user\_password | The password for the default user. If not set, a random one will be generated and available in the generated\_user\_password output variable. | `string` | `""` | no |
66-
| zone | The zone for the master instance, it should be something like: `us-central1-a`, `us-east1-c`. | `string` | n/a | yes |
66+
| zone | The zone for the master instance, it should be something like: `us-central1-a`, `us-east1-c`. | `string` | `null` | no |
6767

6868
## Outputs
6969

modules/mysql/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ variable "edition" {
7979
variable "zone" {
8080
description = "The zone for the master instance, it should be something like: `us-central1-a`, `us-east1-c`."
8181
type = string
82+
default = null
8283
}
8384

8485
variable "secondary_zone" {

modules/safer_mysql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ mysql -S $HOME/mysql_sockets/myproject:region:instance -u user -p
211211
| user\_name | The name of the default user | `string` | `"default"` | no |
212212
| user\_password | The password for the default user. If not set, a random one will be generated and available in the generated\_user\_password output variable. | `string` | `""` | no |
213213
| vpc\_network | Existing VPC network to which instances are connected. The networks needs to be configured with https://cloud.google.com/vpc/docs/configure-private-services-access. | `string` | n/a | yes |
214-
| zone | The zone for the master instance, it should be something like: `a`, `c`. | `string` | n/a | yes |
214+
| zone | The zone for the master instance, it should be something like: `a`, `c`. | `string` | `null` | no |
215215

216216
## Outputs
217217

modules/safer_mysql/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ variable "edition" {
7070
variable "zone" {
7171
description = "The zone for the master instance, it should be something like: `a`, `c`."
7272
type = string
73+
default = null
7374
}
7475

7576
variable "secondary_zone" {

0 commit comments

Comments
 (0)