Skip to content

Commit

Permalink
feat(google_cloudsql_mysql): allow disk_size arg
Browse files Browse the repository at this point in the history
  • Loading branch information
emaydeck-mozilla committed Aug 6, 2024
1 parent 7115a1d commit f449b52
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google_cloudsql_mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ output "mysql_database" {
| <a name="input_db_mem_gb"></a> [db\_mem\_gb](#input\_db\_mem\_gb) | See: https://cloud.google.com/sql/pricing#2nd-gen-pricing | `string` | `"12"` | no |
| <a name="input_deletion_protection"></a> [deletion\_protection](#input\_deletion\_protection) | Whether the instance is protected from deletion (TF) | `bool` | `true` | no |
| <a name="input_deletion_protection_enabled"></a> [deletion\_protection\_enabled](#input\_deletion\_protection\_enabled) | Whether the instance is protected from deletion (API) | `bool` | `true` | no |
| <a name="input_disk_size"></a> [disk\_size](#input\_disk\_size) | The size of the data disk, in GB. | `string` | `null` | no |
| <a name="input_edition"></a> [edition](#input\_edition) | The edition of the instance, can be `ENTERPRISE` or `ENTERPRISE_PLUS`. | `string` | `"ENTERPRISE"` | no |
| <a name="input_enable_private_path_for_google_cloud_services"></a> [enable\_private\_path\_for\_google\_cloud\_services](#input\_enable\_private\_path\_for\_google\_cloud\_services) | If true, will allow Google Cloud Services access over private IP. | `bool` | `false` | no |
| <a name="input_enable_public_ip"></a> [enable\_public\_ip](#input\_enable\_public\_ip) | If true, will assign a public IP to database instance. | `bool` | `false` | no |
Expand All @@ -134,7 +135,7 @@ output "mysql_database" {
| <a name="input_maintenance_window_update_track"></a> [maintenance\_window\_update\_track](#input\_maintenance\_window\_update\_track) | Receive updates earlier (canary) or later (stable) | `string` | `"stable"` | no |
| <a name="input_network"></a> [network](#input\_network) | Network where the private peering should attach. | `string` | `"default"` | no |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | GCP Project ID | `string` | `null` | no |
| <a name="input_query_insights_enabled"></a> [query\_insights\_enabled](#input\_query\_insights\_enabled) | Enable / disable Query Insights (See: https://cloud.google.com/sql/docs/mysql/using-query-insights) | `bool` | `false` | no |
| <a name="input_query_insights_enabled"></a> [query\_insights\_enabled](#input\_query\_insights\_enabled) | Enable / disable Query Insights (See: https://cloud.google.com/sql/docs/mysql/using-query-insights) | `bool` | `true` | no |
| <a name="input_query_plans_per_minute"></a> [query\_plans\_per\_minute](#input\_query\_plans\_per\_minute) | Query Insights: sampling rate | `number` | `5` | no |
| <a name="input_query_string_length"></a> [query\_string\_length](#input\_query\_string\_length) | Query Insights: length of queries | `number` | `1024` | no |
| <a name="input_realm"></a> [realm](#input\_realm) | Realm e.g., nonprod. | `string` | `""` | no |
Expand Down
2 changes: 2 additions & 0 deletions google_cloudsql_mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ resource "google_sql_database_instance" "primary" {

deletion_protection_enabled = var.deletion_protection_enabled

disk_size = var.disk_size

disk_type = "PD_SSD"

edition = var.edition
Expand Down
6 changes: 6 additions & 0 deletions google_cloudsql_mysql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,9 @@ variable "replica_enable_private_path_for_google_cloud_services" {
description = "This OVERRIDES var.enable_private_path_for_google_cloud_services for replicas (replicas use var.enable_private_path_for_google_cloud_services per default)."
default = null
}

variable "disk_size" {
type = string
description = "The size of the data disk, in GB."
default = null
}

0 comments on commit f449b52

Please sign in to comment.