File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,25 @@ module "review_document_gateway" {
1010 origin = contains ([" prod" ], terraform. workspace ) ? " 'https://${ var . domain } '" : " 'https://${ terraform . workspace } .${ var . domain } '"
1111}
1212
13- module "review_document_id_gateway" {
13+ resource "aws_api_gateway_resource" "review_document_id" {
14+ rest_api_id = aws_api_gateway_rest_api. ndr_doc_store_api . id
15+ parent_id = module. review_document_gateway . gateway_resource_id
16+ path_part = " {id}"
17+ }
18+
19+ module "review_document_version_gateway" {
1420 source = " ./modules/gateway"
1521 api_gateway_id = aws_api_gateway_rest_api. ndr_doc_store_api . id
16- parent_id = module . review_document_gateway . gateway_resource_id
22+ parent_id = aws_api_gateway_resource . review_document_id . id
1723 http_methods = [" GET" , " PATCH" ]
1824 authorization = " CUSTOM"
19- gateway_path = " {id}/{ version}"
25+ gateway_path = " {version}"
2026 authorizer_id = aws_api_gateway_authorizer. repo_authoriser . id
2127 require_credentials = true
2228 origin = contains ([" prod" ], terraform. workspace ) ? " 'https://${ var . domain } '" : " 'https://${ terraform . workspace } .${ var . domain } '"
2329
2430 request_parameters = {
25- " method.request.path.id" = true
31+ " method.request.path.id" = true
32+ " method.request.path.version" = true
2633 }
2734}
You can’t perform that action at this time.
0 commit comments