@@ -9,23 +9,29 @@ resource "aws_apigatewayv2_route" "debug_route" {
9
9
resource "aws_apigatewayv2_route" "client_identification" {
10
10
api_id = aws_apigatewayv2_api. main . id
11
11
route_key = " POST /identification/clients/identification"
12
+
12
13
// Identification Lambda integration
13
14
}
14
15
15
- resource "aws_apigatewayv2_route" "order_checkout " {
16
+ resource "aws_apigatewayv2_route" "order_checkout_and_listing " {
16
17
api_id = aws_apigatewayv2_api. main . id
17
- route_key = " POST /order/orders"
18
- // Client Lambda Authorizer integration
18
+ route_key = " ANY /order/orders" // due to Servlet Filter urlPatterns not supporting specific HTTP methods
19
+
20
+ // Client Lambda Authorizer authorization
21
+ target = " integrations/${ aws_apigatewayv2_integration . proxy_to_alb . id } "
19
22
}
20
23
21
24
resource "aws_apigatewayv2_route" "order_confirmation" {
22
25
api_id = aws_apigatewayv2_api. main . id
23
26
route_key = " POST /payment/payments/initialize"
24
- // Client Lambda Authorizer integration
27
+
28
+ // Client Lambda Authorizer authorization
29
+ target = " integrations/${ aws_apigatewayv2_integration . proxy_to_alb . id } "
25
30
}
26
31
27
32
resource "aws_apigatewayv2_route" "forward_to_alb_route" {
28
33
api_id = aws_apigatewayv2_api. main . id
29
34
route_key = " ANY /{proxy+}"
30
- // Private Resource integration (vpc link + alb)
35
+
36
+ target = " integrations/${ aws_apigatewayv2_integration . proxy_to_alb . id } "
31
37
}
0 commit comments