diff --git a/terraform/gcp/modules/mysql-shard/mysql.tf b/terraform/gcp/modules/mysql-shard/mysql.tf index 21a9d81a7..1746b5b08 100644 --- a/terraform/gcp/modules/mysql-shard/mysql.tf +++ b/terraform/gcp/modules/mysql-shard/mysql.tf @@ -90,7 +90,7 @@ resource "google_sql_database" "trillian" { name = var.db_name project = var.project_id instance = google_sql_database_instance.trillian.name - collation = "utf8_general_ci" + collation = var.collation depends_on = [google_sql_database_instance.trillian] } diff --git a/terraform/gcp/modules/mysql-shard/variables.tf b/terraform/gcp/modules/mysql-shard/variables.tf index 41bb7cfaf..d98f5d7a4 100644 --- a/terraform/gcp/modules/mysql-shard/variables.tf +++ b/terraform/gcp/modules/mysql-shard/variables.tf @@ -122,3 +122,9 @@ variable "password" { description = "mysql password within the database" sensitive = true } + +variable "collation" { + type = string + description = "collation setting for database" + default = "utf8_general_ci" +} diff --git a/terraform/gcp/modules/mysql/mysql.tf b/terraform/gcp/modules/mysql/mysql.tf index f525222c3..dfba2fbff 100644 --- a/terraform/gcp/modules/mysql/mysql.tf +++ b/terraform/gcp/modules/mysql/mysql.tf @@ -180,7 +180,7 @@ resource "google_sql_database" "trillian" { name = var.db_name project = var.project_id instance = google_sql_database_instance.sigstore.name - collation = "utf8_general_ci" + collation = var.collation depends_on = [google_sql_database_instance.sigstore] } @@ -188,7 +188,7 @@ resource "google_sql_database" "searchindexes" { name = var.index_db_name project = var.project_id instance = google_sql_database_instance.sigstore.name - collation = "utf8_general_ci" + collation = var.collation depends_on = [google_sql_database_instance.sigstore] } diff --git a/terraform/gcp/modules/mysql/variables.tf b/terraform/gcp/modules/mysql/variables.tf index 23cab47f0..f7ce7e1cb 100644 --- a/terraform/gcp/modules/mysql/variables.tf +++ b/terraform/gcp/modules/mysql/variables.tf @@ -121,3 +121,9 @@ variable "deletion_protection" { description = "Deletion protection for MYSQL database. Must be set to false for `terraform apply` or `terraform destroy` to delete the db." default = true } + +variable "collation" { + type = string + description = "collation setting for database" + default = "utf8_general_ci" +} diff --git a/terraform/gcp/modules/sigstore/sigstore.tf b/terraform/gcp/modules/sigstore/sigstore.tf index 3d0b8cbc3..e51ef637b 100644 --- a/terraform/gcp/modules/sigstore/sigstore.tf +++ b/terraform/gcp/modules/sigstore/sigstore.tf @@ -174,6 +174,7 @@ module "mysql" { database_version = var.mysql_db_version tier = var.mysql_tier availability_type = var.mysql_availability_type + collation = var.mysql_collation replica_zones = var.mysql_replica_zones replica_tier = var.mysql_replica_tier @@ -373,6 +374,7 @@ module "ctlog_shards" { require_ssl = var.mysql_require_ssl backup_enabled = var.mysql_backup_enabled binary_log_backup_enabled = var.mysql_binary_log_backup_enabled + collation = var.mysql_collation depends_on = [ @@ -423,6 +425,7 @@ module "standalone_mysqls" { require_ssl = var.mysql_require_ssl backup_enabled = var.mysql_backup_enabled binary_log_backup_enabled = var.mysql_binary_log_backup_enabled + collation = var.mysql_collation depends_on = [ diff --git a/terraform/gcp/modules/sigstore/variables.tf b/terraform/gcp/modules/sigstore/variables.tf index 4a3170fa5..89bac1f23 100644 --- a/terraform/gcp/modules/sigstore/variables.tf +++ b/terraform/gcp/modules/sigstore/variables.tf @@ -239,6 +239,12 @@ variable "mysql_binary_log_backup_enabled" { default = true } +variable "mysql_collation" { + type = string + description = "collation setting for database" + default = "utf8_general_ci" +} + variable "fulcio_keyring_name" { type = string description = "Name of Fulcio keyring."