@@ -54,15 +54,15 @@ locals {
54
54
}
55
55
56
56
57
- resource "aws_cloudwatch_log_group" "aztec -bootstrap-log-group" {
57
+ resource "aws_cloudwatch_log_group" "p2p -bootstrap-log-group" {
58
58
count = local. bootnode_count
59
- name = " /fargate/service/${ var . DEPLOY_TAG } /aztec -bootstrap-${ count . index + 1 } "
59
+ name = " /fargate/service/${ var . DEPLOY_TAG } /p2p -bootstrap-${ count . index + 1 } "
60
60
retention_in_days = 14
61
61
}
62
62
63
- resource "aws_service_discovery_service" "aztec -bootstrap" {
63
+ resource "aws_service_discovery_service" "p2p -bootstrap" {
64
64
count = local. bootnode_count
65
- name = " ${ var . DEPLOY_TAG } -aztec -bootstrap-${ count . index + 1 } "
65
+ name = " ${ var . DEPLOY_TAG } -p2p -bootstrap-${ count . index + 1 } "
66
66
67
67
health_check_custom_config {
68
68
failure_threshold = 1
@@ -91,9 +91,9 @@ resource "aws_service_discovery_service" "aztec-bootstrap" {
91
91
}
92
92
}
93
93
94
- resource "aws_ecs_task_definition" "aztec -bootstrap" {
94
+ resource "aws_ecs_task_definition" "p2p -bootstrap" {
95
95
count = local. bootnode_count
96
- family = " ${ var . DEPLOY_TAG } -aztec -bootstrap-${ count . index + 1 } "
96
+ family = " ${ var . DEPLOY_TAG } -p2p -bootstrap-${ count . index + 1 } "
97
97
requires_compatibilities = [" FARGATE" ]
98
98
network_mode = " awsvpc"
99
99
cpu = " 2048"
@@ -104,7 +104,7 @@ resource "aws_ecs_task_definition" "aztec-bootstrap" {
104
104
container_definitions = << DEFINITIONS
105
105
[
106
106
{
107
- "name": "${ var . DEPLOY_TAG } -aztec -bootstrap-${ count . index + 1 } ",
107
+ "name": "${ var . DEPLOY_TAG } -p2p -bootstrap-${ count . index + 1 } ",
108
108
"image": "${ var . DOCKERHUB_ACCOUNT } /aztec-sandbox:${ var . DEPLOY_TAG } ",
109
109
"essential": true,
110
110
"command": ["start"],
@@ -154,7 +154,7 @@ resource "aws_ecs_task_definition" "aztec-bootstrap" {
154
154
"logConfiguration": {
155
155
"logDriver": "awslogs",
156
156
"options": {
157
- "awslogs-group": "/fargate/service/${ var . DEPLOY_TAG } /aztec -bootstrap-${ count . index + 1 } ",
157
+ "awslogs-group": "/fargate/service/${ var . DEPLOY_TAG } /p2p -bootstrap-${ count . index + 1 } ",
158
158
"awslogs-region": "eu-west-2",
159
159
"awslogs-stream-prefix": "ecs"
160
160
}
@@ -164,9 +164,9 @@ resource "aws_ecs_task_definition" "aztec-bootstrap" {
164
164
DEFINITIONS
165
165
}
166
166
167
- resource "aws_ecs_service" "aztec -bootstrap" {
167
+ resource "aws_ecs_service" "p2p -bootstrap" {
168
168
count = local. bootnode_count
169
- name = " ${ var . DEPLOY_TAG } -aztec -bootstrap-${ count . index + 1 } "
169
+ name = " ${ var . DEPLOY_TAG } -p2p -bootstrap-${ count . index + 1 } "
170
170
cluster = data. terraform_remote_state . setup_iac . outputs . ecs_cluster_id
171
171
launch_type = " FARGATE"
172
172
desired_count = 1
@@ -183,23 +183,23 @@ resource "aws_ecs_service" "aztec-bootstrap" {
183
183
}
184
184
185
185
service_registries {
186
- registry_arn = aws_service_discovery_service. aztec -bootstrap [count . index ]. arn
187
- container_name = " ${ var . DEPLOY_TAG } -aztec -bootstrap-${ count . index + 1 } "
186
+ registry_arn = aws_service_discovery_service. p2p -bootstrap [count . index ]. arn
187
+ container_name = " ${ var . DEPLOY_TAG } -p2p -bootstrap-${ count . index + 1 } "
188
188
container_port = 80
189
189
}
190
190
191
191
load_balancer {
192
- target_group_arn = aws_lb_target_group. aztec -bootstrap-target-group [count . index ]. id
193
- container_name = " ${ var . DEPLOY_TAG } -aztec -bootstrap-${ count . index + 1 } "
192
+ target_group_arn = aws_lb_target_group. p2p -bootstrap-target-group [count . index ]. id
193
+ container_name = " ${ var . DEPLOY_TAG } -p2p -bootstrap-${ count . index + 1 } "
194
194
container_port = var. BOOTNODE_LISTEN_PORT + count. index
195
195
}
196
196
197
- task_definition = aws_ecs_task_definition. aztec -bootstrap [count . index ]. family
197
+ task_definition = aws_ecs_task_definition. p2p -bootstrap [count . index ]. family
198
198
}
199
199
200
- resource "aws_lb_target_group" "aztec -bootstrap-target-group" {
200
+ resource "aws_lb_target_group" "p2p -bootstrap-target-group" {
201
201
count = local. bootnode_count
202
- name = " aztec -bootstrap-${ count . index + 1 } -target-group"
202
+ name = " p2p -bootstrap-${ count . index + 1 } -target-group"
203
203
port = var. BOOTNODE_LISTEN_PORT + count. index
204
204
protocol = " TCP"
205
205
target_type = " ip"
@@ -224,18 +224,18 @@ resource "aws_security_group_rule" "allow-bootstrap-tcp" {
224
224
security_group_id = data. terraform_remote_state . aztec-network_iac . outputs . p2p_security_group_id
225
225
}
226
226
227
- resource "aws_lb_listener" "aztec -bootstrap-tcp-listener" {
227
+ resource "aws_lb_listener" "p2p -bootstrap-tcp-listener" {
228
228
count = local. bootnode_count
229
229
load_balancer_arn = data. terraform_remote_state . aztec-network_iac . outputs . nlb_arn
230
230
port = var. BOOTNODE_LISTEN_PORT + count. index
231
231
protocol = " TCP"
232
232
233
233
tags = {
234
- name = " aztec -bootstrap-${ count . index } -target-group"
234
+ name = " p2p -bootstrap-${ count . index } -target-group"
235
235
}
236
236
237
237
default_action {
238
238
type = " forward"
239
- target_group_arn = aws_lb_target_group. aztec -bootstrap-target-group [count . index ]. arn
239
+ target_group_arn = aws_lb_target_group. p2p -bootstrap-target-group [count . index ]. arn
240
240
}
241
241
}
0 commit comments