Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/move kms key ring to variable #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ resource "google_project_iam_member" "app-role-binding" {

// HSM-KMS setup for signers
resource "google_kms_key_ring" "gasolina_key_ring" {
name = "gasolinaKeyRing"
name = var.kms_key_ring
location = "global"

depends_on = [module.enabled_google_apis.project_id]
Expand Down Expand Up @@ -179,7 +179,7 @@ resource "google_cloud_run_service" "gasolina_api" {
}
env {
name = "GCP_KEY_RING_ID"
value = "gasolinaKeyRing"
value = var.kms_key_ring
}
env {
name = "LAYERZERO_SUPPORTED_ULN_VERSIONS"
Expand Down Expand Up @@ -235,4 +235,4 @@ resource "google_cloud_run_service_iam_policy" "noauth" {
module.enabled_google_apis.project_id,
google_cloud_run_service.gasolina_api
]
}
}
8 changes: 7 additions & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,10 @@ variable "num_signers" {
variable "available_chain_names" {
type = string
description = "Comma separated list of chain names that gasolina will support e.g. ethereum,bsc,avalanche,polygon"
}
}

variable "kms_key_ring" {
type = string
description = "The name of the key ring to create in KMS"
}