Skip to content

Commit

Permalink
feat: adds settings.location_preference.follow_gae_application parame…
Browse files Browse the repository at this point in the history
…ter to modules. (#385)
  • Loading branch information
isaurabhuttam committed Dec 9, 2022
1 parent 0ea1968 commit edefa43
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 6 deletions.
1 change: 1 addition & 0 deletions modules/mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The following dependency must be available for SQL Server module:
| disk\_size | The disk size for the master instance. | `number` | `10` | no |
| disk\_type | The disk type for the master instance. | `string` | `"PD_SSD"` | no |
| encryption\_key\_name | The full path to the encryption key used for the CMEK disk encryption | `string` | `null` | no |
| follow\_gae\_application | A Google App Engine application whose zone to remain in. Must be in the same region as this instance. | `string` | `null` | no |
| ip\_configuration | The ip configuration for the master instances. | <pre>object({<br> authorized_networks = list(map(string))<br> ipv4_enabled = bool<br> private_network = string<br> require_ssl = bool<br> allocated_ip_range = string<br> })</pre> | <pre>{<br> "allocated_ip_range": null,<br> "authorized_networks": [],<br> "ipv4_enabled": true,<br> "private_network": null,<br> "require_ssl": null<br>}</pre> | no |
| maintenance\_window\_day | The day of week (1-7) for the master instance maintenance. | `number` | `1` | no |
| maintenance\_window\_hour | The hour of day (0-23) maintenance window for the master instance maintenance. | `number` | `23` | no |
Expand Down
5 changes: 3 additions & 2 deletions modules/mssql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ resource "google_sql_database_instance" "default" {
user_labels = var.user_labels

location_preference {
zone = var.zone
secondary_zone = var.secondary_zone
zone = var.zone
secondary_zone = var.secondary_zone
follow_gae_application = var.follow_gae_application
}

maintenance_window {
Expand Down
6 changes: 6 additions & 0 deletions modules/mssql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ variable "secondary_zone" {
default = null
}

variable "follow_gae_application" {
type = string
description = "A Google App Engine application whose zone to remain in. Must be in the same region as this instance."
default = null
}

variable "activation_policy" {
description = "The activation policy for the master instance.Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`."
type = string
Expand Down
1 change: 1 addition & 0 deletions modules/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq
| enable\_default\_db | Enable or disable the creation of the default database | `bool` | `true` | no |
| enable\_default\_user | Enable or disable the creation of the default user | `bool` | `true` | no |
| encryption\_key\_name | The full path to the encryption key used for the CMEK disk encryption | `string` | `null` | no |
| follow\_gae\_application | A Google App Engine application whose zone to remain in. Must be in the same region as this instance. | `string` | `null` | no |
| insights\_config | The insights\_config settings for the database. | <pre>object({<br> query_string_length = number<br> record_application_tags = bool<br> record_client_address = bool<br> })</pre> | `null` | no |
| ip\_configuration | The ip\_configuration settings subblock | <pre>object({<br> authorized_networks = list(map(string))<br> ipv4_enabled = bool<br> private_network = string<br> require_ssl = bool<br> allocated_ip_range = string<br> })</pre> | <pre>{<br> "allocated_ip_range": null,<br> "authorized_networks": [],<br> "ipv4_enabled": true,<br> "private_network": null,<br> "require_ssl": null<br>}</pre> | no |
| maintenance\_window\_day | The day of week (1-7) for the master instance maintenance. | `number` | `1` | no |
Expand Down
5 changes: 3 additions & 2 deletions modules/mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ resource "google_sql_database_instance" "default" {
}

location_preference {
zone = var.zone
secondary_zone = var.secondary_zone
zone = var.zone
secondary_zone = var.secondary_zone
follow_gae_application = var.follow_gae_application
}

maintenance_window {
Expand Down
6 changes: 6 additions & 0 deletions modules/mysql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ variable "secondary_zone" {
default = null
}

variable "follow_gae_application" {
type = string
description = "A Google App Engine application whose zone to remain in. Must be in the same region as this instance."
default = null
}

variable "activation_policy" {
description = "The activation policy for the master instance. Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`."
type = string
Expand Down
1 change: 1 addition & 0 deletions modules/postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Note: CloudSQL provides [disk autoresize](https://cloud.google.com/sql/docs/mysq
| enable\_default\_db | Enable or disable the creation of the default database | `bool` | `true` | no |
| enable\_default\_user | Enable or disable the creation of the default user | `bool` | `true` | no |
| encryption\_key\_name | The full path to the encryption key used for the CMEK disk encryption | `string` | `null` | no |
| follow\_gae\_application | A Google App Engine application whose zone to remain in. Must be in the same region as this instance. | `string` | `null` | no |
| iam\_user\_emails | A list of IAM users to be created in your cluster | `list(string)` | `[]` | no |
| insights\_config | The insights\_config settings for the database. | <pre>object({<br> query_string_length = number<br> record_application_tags = bool<br> record_client_address = bool<br> })</pre> | `null` | no |
| ip\_configuration | The ip configuration for the master instances. | <pre>object({<br> authorized_networks = list(map(string))<br> ipv4_enabled = bool<br> private_network = string<br> require_ssl = bool<br> allocated_ip_range = string<br> })</pre> | <pre>{<br> "allocated_ip_range": null,<br> "authorized_networks": [],<br> "ipv4_enabled": true,<br> "private_network": null,<br> "require_ssl": null<br>}</pre> | no |
Expand Down
5 changes: 3 additions & 2 deletions modules/postgresql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ resource "google_sql_database_instance" "default" {
user_labels = var.user_labels

location_preference {
zone = var.zone
secondary_zone = var.secondary_zone
zone = var.zone
secondary_zone = var.secondary_zone
follow_gae_application = var.follow_gae_application
}

maintenance_window {
Expand Down
6 changes: 6 additions & 0 deletions modules/postgresql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ variable "secondary_zone" {
default = null
}

variable "follow_gae_application" {
type = string
description = "A Google App Engine application whose zone to remain in. Must be in the same region as this instance."
default = null
}

variable "activation_policy" {
description = "The activation policy for the master instance.Can be either `ALWAYS`, `NEVER` or `ON_DEMAND`."
type = string
Expand Down

0 comments on commit edefa43

Please sign in to comment.