Skip to content

Commit

Permalink
Merge branch 'master' into cg/shared_ptr-to-transcript
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton authored Dec 1, 2023
2 parents 787e050 + 640aabc commit ac7dfc1
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 41 deletions.
40 changes: 20 additions & 20 deletions yarn-project/aztec-node/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -369,23 +369,23 @@ resource "aws_security_group_rule" "allow-node-tcp" {
## NLB listeners can't have a 'weight' property defined. You will see there isn't one here but that doesn't
## stop it trying to automatically specify one and giving an error

resource "aws_lb_listener" "aztec-node-tcp-listener" {
count = local.node_count
load_balancer_arn = data.terraform_remote_state.aztec-network_iac.outputs.nlb_arn
port = var.NODE_TCP_PORT + count.index
protocol = "TCP"

tags = {
name = "aztec-node-${count.index}-tcp-listener"
}

default_action {
type = "forward"

forward {
target_group {
arn = aws_lb_target_group.aztec-bootstrap-target-group[count.index].arn
}
}
}
}
# resource "aws_lb_listener" "aztec-node-tcp-listener" {
# count = local.node_count
# load_balancer_arn = data.terraform_remote_state.aztec-network_iac.outputs.nlb_arn
# port = var.NODE_TCP_PORT + count.index
# protocol = "TCP"

# tags = {
# name = "aztec-node-${count.index}-tcp-listener"
# }

# default_action {
# type = "forward"

# forward {
# target_group {
# arn = aws_lb_target_group.aztec-bootstrap-target-group[count.index].arn
# }
# }
# }
# }
47 changes: 26 additions & 21 deletions yarn-project/p2p-bootstrap/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ resource "aws_cloudwatch_log_group" "aztec-bootstrap-log-group" {
}

resource "aws_service_discovery_service" "aztec-bootstrap" {
name = "${var.DEPLOY_TAG}-aztec-bootstrap-${count.index + 1}"
count = local.bootnode_count
name = "${var.DEPLOY_TAG}-aztec-bootstrap-${count.index + 1}"

health_check_custom_config {
failure_threshold = 1
Expand Down Expand Up @@ -223,23 +224,27 @@ resource "aws_security_group_rule" "allow-bootstrap-tcp" {
security_group_id = data.terraform_remote_state.aztec-network_iac.outputs.p2p_security_group_id
}

resource "aws_lb_listener" "aztec-bootstrap-tcp-listener" {
count = local.bootnode_count
load_balancer_arn = data.terraform_remote_state.aztec-network_iac.outputs.nlb_arn
port = var.BOOTNODE_LISTEN_PORT + count.index
protocol = "TCP"

tags = {
name = "aztec-bootstrap-${count.index}-target-group"
}

default_action {
type = "forward"

forward {
target_group {
arn = aws_lb_target_group.aztec-bootstrap-target-group[count.index].arn
}
}
}
}
## Commented out here and setup manually as terraform (or the aws provider version we are using) has a bug
## NLB listeners can't have a 'weight' property defined. You will see there isn't one here but that doesn't
## stop it trying to automatically specify one and giving an error

# resource "aws_lb_listener" "aztec-bootstrap-tcp-listener" {
# count = local.bootnode_count
# load_balancer_arn = data.terraform_remote_state.aztec-network_iac.outputs.nlb_arn
# port = var.BOOTNODE_LISTEN_PORT + count.index
# protocol = "TCP"

# tags = {
# name = "aztec-bootstrap-${count.index}-target-group"
# }

# default_action {
# type = "forward"

# forward {
# target_group {
# arn = aws_lb_target_group.aztec-bootstrap-target-group[count.index].arn
# }
# }
# }
# }

0 comments on commit ac7dfc1

Please sign in to comment.