Skip to content

Commit

Permalink
declare instance name, tier for shard; comment out moved block for pr…
Browse files Browse the repository at this point in the history
…evious move (#1148)

Signed-off-by: Bob Callaway <[email protected]>
  • Loading branch information
bobcallaway authored Jun 24, 2024
1 parent f0b09c0 commit f70cb19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions terraform/gcp/modules/mysql/mysql.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions terraform/gcp/modules/sigstore/sigstore.tf
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,15 @@ 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

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
Expand Down
2 changes: 2 additions & 0 deletions terraform/gcp/modules/sigstore/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit f70cb19

Please sign in to comment.