Skip to content

Commit 4de1ae9

Browse files
[PRMP-586] add path param to get doc review gateway
1 parent 6a5d737 commit 4de1ae9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

infrastructure/lambda-get-document-review.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ module "get-document-review-gateway" {
3838
require_credentials = true
3939
origin = contains(["prod"], terraform.workspace) ? "'https://${var.domain}'" : "'https://${terraform.workspace}.${var.domain}'"
4040
gateway_path = "GetDocumentReview"
41+
42+
request_parameters = {
43+
"method.request.path.id" = true
44+
}
45+
}
46+
47+
resource "aws_api_gateway_resource" "get_document_review" {
48+
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
49+
parent_id = module.get-document-review-gateway.gateway_resource_id
50+
path_part = "{id}"
4151
}
4252

4353
module "get-document-review-lambda-alarm" {

infrastructure/modules/gateway/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ module "api_gateway_resource" {
7676
| <a name="input_http_methods"></a> [http\_methods](#input\_http\_methods) | List of allowed HTTP methods for the resource (e.g., ["GET", "POST"]). | `list(string)` | n/a | yes |
7777
| <a name="input_origin"></a> [origin](#input\_origin) | Allowed origin for CORS requests (e.g., '*', or specific domain). | `string` | `"'*'"` | no |
7878
| <a name="input_parent_id"></a> [parent\_id](#input\_parent\_id) | ID of the parent API Gateway resource (e.g., root path or another nested resource). | `string` | n/a | yes |
79+
| <a name="input_request_parameters"></a> [request\_parameters](#input\_request\_parameters) | Request parameters for the API Gateway method. | `map(string)` | `{}` | no |
7980
| <a name="input_require_credentials"></a> [require\_credentials](#input\_require\_credentials) | Sets the value of 'Access-Control-Allow-Credentials' which controls whether auth cookies are needed. | `bool` | n/a | yes |
8081
## Outputs
8182

0 commit comments

Comments
 (0)