diff --git a/terraform/gcp/modules/mysql/mysql.tf b/terraform/gcp/modules/mysql/mysql.tf index 15f0e00ee..c79f144c0 100644 --- a/terraform/gcp/modules/mysql/mysql.tf +++ b/terraform/gcp/modules/mysql/mysql.tf @@ -143,10 +143,12 @@ resource "google_sql_database_instance" "sigstore" { } } +/* moved { from = google_sql_database_instance.trillian to = google_sql_database_instance.sigstore } +*/ resource "google_sql_database_instance" "read_replica" { for_each = toset(var.replica_zones) diff --git a/terraform/gcp/modules/sigstore/sigstore.tf b/terraform/gcp/modules/sigstore/sigstore.tf index 845335aca..05597bc6d 100644 --- a/terraform/gcp/modules/sigstore/sigstore.tf +++ b/terraform/gcp/modules/sigstore/sigstore.tf @@ -346,7 +346,7 @@ module "ctlog_shards" { for_each = var.ctlog_shards - instance_name = format("%s-ctlog-%s", var.cluster_name, each.key) + instance_name = each.value["instance_name"] != "" ? each.value["instance_name"] : format("%s-ctlog-%s", var.cluster_name, each.key) project_id = var.project_id region = var.region @@ -354,10 +354,7 @@ module "ctlog_shards" { cluster_name = var.cluster_name database_version = each.value["mysql_db_version"] - - // NB: This is commented out so that we pick up the defaults - // for the particular environment consistently. - //mysql_tier = var.mysql_tier + tier = each.value["mysql_tier"] != "" ? each.value["mysql_tier"] : var.mysql_tier replica_zones = var.mysql_replica_zones replica_tier = var.mysql_replica_tier diff --git a/terraform/gcp/modules/sigstore/variables.tf b/terraform/gcp/modules/sigstore/variables.tf index 6ea17c432..3fedc7978 100644 --- a/terraform/gcp/modules/sigstore/variables.tf +++ b/terraform/gcp/modules/sigstore/variables.tf @@ -342,6 +342,8 @@ variable "dns_domain_name" { variable "ctlog_shards" { type = map(object({ mysql_db_version = string + mysql_tier = string + instance_name = optional(string) })) description = "Map of CTLog shards to create. If keys are '2022' and '2023', it would create 2 independent CTLog Cloud MySql instances named sigstore-staging-ctlog-2022 and sigstore-staging-ctlog-2023."