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
8 changes: 4 additions & 4 deletions deployment/modules/gcp/witness/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ resource "google_secret_manager_secret_iam_member" "secretaccess_compute_witness
}

resource "google_spanner_instance" "witness_spanner" {
name = "witness-${var.env}"
name = var.base_name
config = "regional-${var.region}"
display_name = "Witness ${var.env}"
display_name = var.base_name
processing_units = 100

force_destroy = var.ephemeral
Expand Down Expand Up @@ -109,7 +109,7 @@ locals {
# This is intended to guard against the upstream image being unavailable for some reason.
resource "google_artifact_registry_repository" "witness" {
location = var.region
repository_id = "witness-remote-${var.env}"
repository_id = var.base_name
description = "Remote repository with witness docker images upstream"
format = "DOCKER"
mode = "REMOTE_REPOSITORY"
Expand All @@ -130,7 +130,7 @@ locals {
}

resource "google_cloud_run_v2_service" "default" {
name = "witness-service-${var.env}"
name = var.base_name
location = var.region
launch_stage = "GA"

Expand Down
5 changes: 5 additions & 0 deletions deployment/modules/gcp/witness/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ variable "project_id" {
type = string
}

variable "base_name" {
description = "Base name to use when creating resources"
type = string
}

variable "region" {
description = "The region to host the cluster in"
type = string
Expand Down
Loading