diff --git a/yarn-project/aztec/terraform/node/main.tf b/yarn-project/aztec/terraform/node/main.tf index 4b177950eb47..4c93d283d1f4 100644 --- a/yarn-project/aztec/terraform/node/main.tf +++ b/yarn-project/aztec/terraform/node/main.tf @@ -59,7 +59,6 @@ locals { node_count = length(local.publisher_private_keys) data_dir = "/usr/src/yarn-project/aztec/data" agents_per_sequencer = var.AGENTS_PER_SEQUENCER - total_agents = local.node_count * local.agents_per_sequencer } resource "aws_cloudwatch_log_group" "aztec-node-log-group" { @@ -551,18 +550,16 @@ resource "aws_security_group_rule" "allow-node-udp-out" { - -// Configuration for proving agents - +# Configuration for proving agents resource "aws_cloudwatch_log_group" "aztec-proving-agent-log-group" { - count = local.total_agents - name = "/fargate/service/${var.DEPLOY_TAG}/aztec-proving-agent-${floor(count.index / local.agents_per_sequencer) + 1}-${(count.index % local.agents_per_sequencer) + 1}" + count = local.node_count + name = "/fargate/service/${var.DEPLOY_TAG}/aztec-proving-agent-group-${count.index + 1}" retention_in_days = 14 } resource "aws_service_discovery_service" "aztec-proving-agent" { - count = local.total_agents - name = "${var.DEPLOY_TAG}-aztec-proving-agent-${floor(count.index / local.agents_per_sequencer) + 1}-${(count.index % local.agents_per_sequencer) + 1}" + count = local.node_count + name = "${var.DEPLOY_TAG}-aztec-proving-agent-group-${count.index + 1}" health_check_custom_config { failure_threshold = 1 @@ -593,8 +590,8 @@ resource "aws_service_discovery_service" "aztec-proving-agent" { # Define task definitions for each node. resource "aws_ecs_task_definition" "aztec-proving-agent" { - count = local.total_agents - family = "${var.DEPLOY_TAG}-aztec-proving-agent-${floor(count.index / local.agents_per_sequencer) + 1}-${(count.index % local.agents_per_sequencer) + 1}" + count = local.node_count + family = "${var.DEPLOY_TAG}-aztec-proving-agent-group-${count.index + 1}" requires_compatibilities = ["FARGATE"] network_mode = "awsvpc" cpu = "16384" @@ -605,7 +602,7 @@ resource "aws_ecs_task_definition" "aztec-proving-agent" { container_definitions = <