From 065bfb7c16078cbaea517ce693854c57a53abef7 Mon Sep 17 00:00:00 2001 From: Aaron Gibson Date: Sat, 3 Jan 2026 16:36:49 +0000 Subject: [PATCH] add ooniapi endpoints to terraform configuration adds the following endpoints to the load balancer path_pattern rules: /api/v1/geolookup /api/v1/collectors /bouncer/net-tests /report* (/report, /report/{report_id}, /report/{report_id}/close) /api/_/show_countries_prioritization /api/_/debug_prioritization There is a maximum of 5 conditions per rule, so a new rule ooniapi_ooniprobe_rule_3 with priority 122 is also added. --- tf/modules/ooniapi_frontend/main.tf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tf/modules/ooniapi_frontend/main.tf b/tf/modules/ooniapi_frontend/main.tf index 93de70fc..ece99d94 100644 --- a/tf/modules/ooniapi_frontend/main.tf +++ b/tf/modules/ooniapi_frontend/main.tf @@ -333,12 +333,34 @@ resource "aws_lb_listener_rule" "ooniapi_ooniprobe_rule_2" { path_pattern { values = [ "/api/v1/test-helpers*", + "/api/v1/geolookup*", + "/api/v1/collectors*", + "/bouncer/net-tests*", "/report*" ] } } } +resource "aws_lb_listener_rule" "ooniapi_ooniprobe_rule_3" { + listener_arn = aws_alb_listener.ooniapi_listener_https.arn + priority = 122 + + action { + type = "forward" + target_group_arn = var.ooniapi_ooniprobe_target_group_arn + } + + condition { + path_pattern { + values = [ + "/api/_/show_countries_prioritization*", + "/api/_/debug_prioritization*", + ] + } + } +} + resource "aws_lb_listener_rule" "ooniapi_ooniprobe_rule_host" { listener_arn = aws_alb_listener.ooniapi_listener_https.arn priority = 125