Skip to content

Commit 19b6275

Browse files
committed
Add ooniapi citizenlab service to prod
1 parent 9691756 commit 19b6275

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

tf/modules/ooniapi_frontend/main.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,25 @@ resource "aws_lb_listener_rule" "ooniapi_oonimeasurements_rule_2" {
457457
}
458458
}
459459
}
460+
461+
resource "aws_lb_listener_rule" "ooniapi_citizenlab_rule" {
462+
listener_arn = aws_alb_listener.ooniapi_listener_https.arn
463+
priority = 143
464+
465+
action {
466+
type = "forward"
467+
target_group_arn = var.ooniapi_citizenlab_target_group_arn
468+
}
469+
condition {
470+
path_pattern {
471+
values = [
472+
"/api/_/url-submission/test-list/*",
473+
"/api/_/url-priorities/list",
474+
"/api/_/url-priorities/update",
475+
"/api/v1/url-submission/submit",
476+
"/api/v1/url-submission/update-url",
477+
"/api/",
478+
]
479+
}
480+
}
481+
}

tf/modules/ooniapi_frontend/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ variable "ooniapi_oonimeasurements_target_group_arn" {
3737
default = null
3838
}
3939

40+
variable "ooniapi_citizenlab_target_group_arn" {
41+
description = "arn for the target group of the citizenlab service"
42+
}
43+
4044
variable "dns_zone_ooni_io" {
4145
description = "id of the DNS zone for ooni_io"
4246
}

0 commit comments

Comments
 (0)