From 4478e83c647987dd0011481bbb166403d0d66907 Mon Sep 17 00:00:00 2001 From: Xiangyi Zheng Date: Mon, 20 May 2024 15:46:39 +0800 Subject: [PATCH 1/2] fix condition --- infra/multichain-vm-dev/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/multichain-vm-dev/main.tf b/infra/multichain-vm-dev/main.tf index 2ebeb3320..07ff10ab0 100644 --- a/infra/multichain-vm-dev/main.tf +++ b/infra/multichain-vm-dev/main.tf @@ -37,7 +37,7 @@ module "gce-container" { }, { name = "MPC_RECOVERY_SIGN_SK" - value = data.google_secret_manager_secret_version.sign_sk_secret_id[count.index] ? data.google_secret_manager_secret_version.sign_sk_secret_id[count.index].secret_data : data.google_secret_manager_secret_version.account_sk_secret_id[count.index].secret_data + value = data.google_secret_manager_secret_version.sign_sk_secret_id[count.index] != null ? data.google_secret_manager_secret_version.sign_sk_secret_id[count.index].secret_data : data.google_secret_manager_secret_version.account_sk_secret_id[count.index].secret_data }, { name = "AWS_ACCESS_KEY_ID" From 94da999e4eb4922c28f95def3df37d895acfb44a Mon Sep 17 00:00:00 2001 From: Xiangyi Zheng Date: Wed, 22 May 2024 15:41:56 +0800 Subject: [PATCH 2/2] update main.tf for testnet too. note testnet never reran terraform --- infra/multichain-testnet-prod/main.tf | 2 +- infra/partner-vm-testnet/main.tf | 2 +- infra/partner-vm-testnet/terraform-testnet-example.tfvars | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infra/multichain-testnet-prod/main.tf b/infra/multichain-testnet-prod/main.tf index 5406513ac..56d00956c 100644 --- a/infra/multichain-testnet-prod/main.tf +++ b/infra/multichain-testnet-prod/main.tf @@ -37,7 +37,7 @@ module "gce-container" { }, { name = "MPC_RECOVERY_SIGN_SK" - value = data.google_secret_manager_secret_version.sign_sk_secret_id[count.index] ? data.google_secret_manager_secret_version.sign_sk_secret_id[count.index].secret_data : data.google_secret_manager_secret_version.account_sk_secret_id[count.index].secret_data + value = data.google_secret_manager_secret_version.sign_sk_secret_id[count.index] != null ? data.google_secret_manager_secret_version.sign_sk_secret_id[count.index].secret_data : data.google_secret_manager_secret_version.account_sk_secret_id[count.index].secret_data }, { name = "AWS_ACCESS_KEY_ID" diff --git a/infra/partner-vm-testnet/main.tf b/infra/partner-vm-testnet/main.tf index 5399c2477..41826cd30 100644 --- a/infra/partner-vm-testnet/main.tf +++ b/infra/partner-vm-testnet/main.tf @@ -37,7 +37,7 @@ module "gce-container" { }, { name = "MPC_RECOVERY_SIGN_SK" - value = data.google_secret_manager_secret_version.sign_sk_secret_id[count.index] ? data.google_secret_manager_secret_version.sign_sk_secret_id[count.index].secret_data : data.google_secret_manager_secret_version.account_sk_secret_id[count.index].secret_data + value = data.google_secret_manager_secret_version.sign_sk_secret_id[count.index] != null ? data.google_secret_manager_secret_version.sign_sk_secret_id[count.index].secret_data : data.google_secret_manager_secret_version.account_sk_secret_id[count.index].secret_data }, { name = "AWS_ACCESS_KEY_ID" diff --git a/infra/partner-vm-testnet/terraform-testnet-example.tfvars b/infra/partner-vm-testnet/terraform-testnet-example.tfvars index cb376f12f..4a24370e2 100644 --- a/infra/partner-vm-testnet/terraform-testnet-example.tfvars +++ b/infra/partner-vm-testnet/terraform-testnet-example.tfvars @@ -14,7 +14,7 @@ node_configs = [ # These 3 values below should match your secret names in google secrets manager account_sk_secret_id = "multichain-account-sk-testnet-0" cipher_sk_secret_id = "multichain-cipher-sk-testnet-0" - sign_sk_secret_id = "multichain-sign-sk-testnet-0" + sign_sk_secret_id = null sk_share_secret_id = "multichain-sk-share-testnet-0" }, ] \ No newline at end of file