Skip to content

Commit

Permalink
fix terraform code for getting sign_sk (#607)
Browse files Browse the repository at this point in the history
* fix condition

* update main.tf for testnet too. note testnet never reran terraform
  • Loading branch information
ppca authored May 23, 2024
1 parent bf4c919 commit 480feea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion infra/multichain-testnet-prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion infra/multichain-vm-dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion infra/partner-vm-testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion infra/partner-vm-testnet/terraform-testnet-example.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
]

0 comments on commit 480feea

Please sign in to comment.