From 67b0ad4302146b5f79b95a8fcff6eb2ac9f29929 Mon Sep 17 00:00:00 2001 From: Steven Platt <31355889+stevenplatt@users.noreply.github.com> Date: Wed, 29 Nov 2023 17:02:09 -0500 Subject: [PATCH] updated formatting and removal of old comments --- .../modules/kubernetes/testnet/variables.tf | 20 +++++------ .../terraform/modules/o1-testnet/testnet.tf | 33 ++++++++----------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/automation/terraform/modules/kubernetes/testnet/variables.tf b/automation/terraform/modules/kubernetes/testnet/variables.tf index b80a4ea00b1..4903f91e398 100644 --- a/automation/terraform/modules/kubernetes/testnet/variables.tf +++ b/automation/terraform/modules/kubernetes/testnet/variables.tf @@ -203,13 +203,11 @@ variable "seed_external_port" { variable "seed_configs" { type = list( object({ - name = string, - class = string, - libp2p_secret = string, - libp2p_secret_pw = string - # external_port = number, - external_ip = string, - # private_key_secret = string, + name = string, + class = string, + libp2p_secret = string, + libp2p_secret_pw = string + external_ip = string, enableArchive = bool, archiveAddress = string persist_working_dir = bool, @@ -233,11 +231,9 @@ variable "block_producer_key_pass" { variable "block_producer_configs" { type = list( object({ - name = string, - class = string, - keypair_name = string, - # private_key = string, - # public_key = string, + name = string, + class = string, + keypair_name = string, privkey_password = string, external_port = number, libp2p_secret = string, diff --git a/automation/terraform/modules/o1-testnet/testnet.tf b/automation/terraform/modules/o1-testnet/testnet.tf index 2377921a0e1..29c82513025 100644 --- a/automation/terraform/modules/o1-testnet/testnet.tf +++ b/automation/terraform/modules/o1-testnet/testnet.tf @@ -66,22 +66,20 @@ module "kubernetes_testnet" { # block_producer_key_pass = var.block_producer_key_pass block_producer_configs = [for i, bp in local.block_producer_configs : { - name = bp.name - class = bp.class - # id = bp.total_node_index + name = bp.name + class = bp.class keypair_name = "${bp.class}-${bp.unique_node_index}-key" privkey_password = "naughty blue worm" external_port = bp.port libp2p_secret = "" enable_gossip_flooding = false - # run_with_user_agent = bp.class =="whale" ? false : ( var.nodes_with_user_agent == [] ? true : contains(var.nodes_with_user_agent, bp.name) ) - run_with_user_agent = bp.class == "whale" ? false : true - run_with_bots = false - enable_peer_exchange = true - isolated = false - enableArchive = false - archiveAddress = length(local.archive_node_configs) != 0 ? "${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["name"]}:${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["serverPort"]}" : "" - persist_working_dir = true + run_with_user_agent = bp.class == "whale" ? false : true + run_with_bots = false + enable_peer_exchange = true + isolated = false + enableArchive = false + archiveAddress = length(local.archive_node_configs) != 0 ? "${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["name"]}:${element(local.archive_node_configs, i % (length(local.archive_node_configs)))["serverPort"]}" : "" + persist_working_dir = true } ] @@ -89,14 +87,11 @@ module "kubernetes_testnet" { seed_configs = [ for i in range(var.seed_count) : { - name = local.seed_static_peers[i].name - class = "seed" - # id = i + 1 - # external_port = local.seed_static_peers[i].port - libp2p_secret = "seed-${i + 1}-key" - libp2p_secret_pw = "naughty blue worm" - external_ip = google_compute_address.seed_static_ip[i].address - # private_key_secret = "online-seeds-account-${i + 1}-key" + name = local.seed_static_peers[i].name + class = "seed" + libp2p_secret = "seed-${i + 1}-key" + libp2p_secret_pw = "naughty blue worm" + external_ip = google_compute_address.seed_static_ip[i].address enableArchive = length(local.archive_node_configs) > 0 archiveAddress = length(local.archive_node_configs) > 0 ? "${element(local.archive_node_configs, i)["name"]}:${element(local.archive_node_configs, i)["serverPort"]}" : "" persist_working_dir = true