Skip to content

Commit

Permalink
Update alb rules for oonimeasurements service
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Jan 16, 2025
1 parent 8840af5 commit fcd71c7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tf/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ module "ooniapi_oonimeasurements_deployer" {

service_name = "oonimeasurements"
repo = "ooni/backend"
branch_name = "master"
branch_name = "richer-analysis"
buildspec_path = "ooniapi/services/oonimeasurements/buildspec.yml"
codestar_connection_arn = aws_codestarconnections_connection.oonidevops.arn

Expand All @@ -619,7 +619,8 @@ module "ooniapi_oonimeasurements" {

task_memory = 64

vpc_id = module.network.vpc_id
first_run = true
vpc_id = module.network.vpc_id

service_name = "oonimeasurements"
default_docker_image_url = "ooni/api-oonimeasurements:latest"
Expand Down
21 changes: 19 additions & 2 deletions tf/modules/ooniapi_frontend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ resource "aws_lb_listener_rule" "ooniapi_oonifindings_rule_host" {
}
}

resource "aws_lb_listener_rule" "ooniapi_oonimeasurements_rule" {
resource "aws_lb_listener_rule" "ooniapi_oonimeasurements_rule_1" {
listener_arn = aws_alb_listener.ooniapi_listener_https.arn
priority = 140

Expand All @@ -220,7 +220,24 @@ resource "aws_lb_listener_rule" "ooniapi_oonimeasurements_rule" {
"/api/v1/raw_measurement",
"/api/v1/measurement_meta",
"/api/v1/measurements",
"/api/v1/torsf_stats",
"/api/v1/torsf_stats"
]
}
}
}

resource "aws_lb_listener_rule" "ooniapi_oonimeasurements_rule_2" {
listener_arn = aws_alb_listener.ooniapi_listener_https.arn
priority = 142

action {
type = "forward"
target_group_arn = var.ooniapi_oonimeasurements_target_group_arn
}

condition {
path_pattern {
values = [
"/api/v1/aggregation",
"/api/v1/aggregation/*",
"/api/v1/observations",
Expand Down

0 comments on commit fcd71c7

Please sign in to comment.