Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/safer_mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ module "safer-mysql-db" {
| 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 |
| edition | The edition of the instance, can be ENTERPRISE or ENTERPRISE\_PLUS. | `string` | `null` | no |
| 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\_users | A list of IAM users to be created in your CloudSQL instance. iam.users.type can be CLOUD\_IAM\_USER, CLOUD\_IAM\_SERVICE\_ACCOUNT, CLOUD\_IAM\_GROUP and is required for type CLOUD\_IAM\_GROUP (IAM groups) | <pre>list(object({<br> id = string,<br> email = string,<br> type = optional(string)<br> }))</pre> | `[]` | no |
Expand Down
8 changes: 5 additions & 3 deletions modules/safer_mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ module "safer_mysql" {
allocated_ip_range = var.allocated_ip_range
}

db_name = var.db_name
db_charset = var.db_charset
db_collation = var.db_collation
enable_default_db = var.enable_default_db
db_name = var.db_name
db_charset = var.db_charset
db_collation = var.db_collation

additional_databases = var.additional_databases
enable_default_user = var.enable_default_user
user_name = var.user_name

// All MySQL users can connect only via the Cloud SQL Proxy.
Expand Down
12 changes: 12 additions & 0 deletions modules/safer_mysql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ variable "read_replicas" {
default = []
}

variable "enable_default_db" {
description = "Enable or disable the creation of the default database"
type = bool
default = true
}

variable "db_name" {
description = "The name of the default database to create"
type = string
Expand Down Expand Up @@ -286,6 +292,12 @@ variable "additional_databases" {
default = []
}

variable "enable_default_user" {
description = "Enable or disable the creation of the default user"
type = bool
default = true
}

variable "user_name" {
description = "The name of the default user"
type = string
Expand Down
Loading