Skip to content

Commit

Permalink
fix: Update mysql version (#47)
Browse files Browse the repository at this point in the history
* fix: Update mysql version

* Replace the validation with a regex

* Remove default values. The CI will set it

* terraform-docs: automated action

---------

Co-authored-by: Justin Brooks <jsbroks@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 1, 2023
1 parent 21beae1 commit f7e9b87
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ No resources.
| <a name="input_create_redis"></a> [create\_redis](#input\_create\_redis) | Boolean indicating whether to provision an redis instance (true) or not (false). | `bool` | `false` | no |
| <a name="input_database_machine_type"></a> [database\_machine\_type](#input\_database\_machine\_type) | Specifies the machine type to be allocated for the database | `string` | `"db-n1-standard-2"` | no |
| <a name="input_database_sort_buffer_size"></a> [database\_sort\_buffer\_size](#input\_database\_sort\_buffer\_size) | Specifies the sort\_buffer\_size value to set for the database | `number` | `262144` | no |
| <a name="input_database_version"></a> [database\_version](#input\_database\_version) | Version for MySQL | `string` | `"MYSQL_8_0_29"` | no |
| <a name="input_database_version"></a> [database\_version](#input\_database\_version) | Version for MySQL | `string` | n/a | yes |
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | If the instance should have deletion protection enabled. The database / Bucket can't be deleted when this value is set to `true`. | `bool` | `true` | no |
| <a name="input_disable_code_saving"></a> [disable\_code\_saving](#input\_disable\_code\_saving) | Boolean indicating if code saving is disabled | `bool` | `false` | no |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | Domain for accessing the Weights & Biases UI. | `string` | `null` | no |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module "gke_app" {
oidc_auth_method = var.oidc_auth_method
oidc_secret = var.oidc_secret
local_restore = var.local_restore
other_wandb_env = {
other_wandb_env = {
"GORILLA_DISABLE_CODE_SAVING" = var.disable_code_saving
}

Expand Down
3 changes: 1 addition & 2 deletions modules/database/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ variable "labels" {
variable "database_version" {
description = "Version for MySQL"
type = string
default = "MYSQL_8_0_28"

validation {
condition = contains(["MYSQL_5_7", "MYSQL_8_0", "MYSQL_8_0_28", "MYSQL_8_0_29", "MYSQL_8_0_30", "MYSQL_8_0_31"], var.database_version)
condition = regex("^MYSQL_(8_0(_[0-9]*)?|5_7)$", var.database_version)
error_message = "We only support MySQL: \"MYSQL_5_7\"; \"MYSQL_8_0\"."
}
}
Expand Down
1 change: 0 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ variable "ssl" {
variable "database_version" {
description = "Version for MySQL"
type = string
default = "MYSQL_8_0_29"
}

variable "database_machine_type" {
Expand Down

0 comments on commit f7e9b87

Please sign in to comment.