Skip to content

Commit

Permalink
fix: double slash in deployed faucet routes (#3555)
Browse files Browse the repository at this point in the history
Faucet currently works with e.g. `<URL>/aztec-dev/aztec-faucet//status`.
Fixing here
  • Loading branch information
spypsy authored Dec 5, 2023
1 parent e967cae commit 6c704a5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions yarn-project/aztec-faucet/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ data "terraform_remote_state" "aztec2_iac" {
}
}

locals {
api_prefix = var.API_PREFIX == "" ? "/${var.DEPLOY_TAG}/aztec-faucet" : "/${var.DEPLOY_TAG}/aztec-faucet/${var.API_PREFIX}"
}


resource "aws_cloudwatch_log_group" "aztec-faucet" {
name = "/fargate/service/${var.DEPLOY_TAG}/aztec-faucet"
Expand Down Expand Up @@ -114,7 +118,7 @@ resource "aws_ecs_task_definition" "aztec-faucet" {
},
{
"name": "API_PREFIX",
"value": "/${var.DEPLOY_TAG}/aztec-faucet/${var.API_PREFIX}"
"value": "${local.api_prefix}"
},
{
"name": "CHAIN_ID",
Expand Down Expand Up @@ -188,7 +192,7 @@ resource "aws_alb_target_group" "aztec-faucet" {
deregistration_delay = 5

health_check {
path = "/${var.DEPLOY_TAG}/aztec-faucet/${var.API_PREFIX}/status"
path = "${local.api_prefix}/status"
matcher = "200"
interval = 10
healthy_threshold = 2
Expand Down

0 comments on commit 6c704a5

Please sign in to comment.