Skip to content

Commit 934b660

Browse files
committed
wire up get_mi lambda in spec and tf
1 parent 1012d8e commit 934b660

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

infrastructure/terraform/components/api/locals.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ locals {
1515
PATCH_LETTER_LAMBDA_ARN = module.patch_letter.function_arn
1616
POST_LETTERS_LAMBDA_ARN = module.post_letters.function_arn
1717
POST_MI_LAMBDA_ARN = module.post_mi.function_arn
18+
GET_MI_LAMBDA_ARN = module.get_mi.function_arn
1819
})
1920

2021
destination_arn = "arn:aws:logs:${var.region}:${var.shared_infra_account_id}:destination:nhs-main-obs-firehose-logs"

infrastructure/terraform/components/api/resources/spec.tmpl.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,56 @@
306306
"uri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${POST_MI_LAMBDA_ARN}/invocations"
307307
}
308308
}
309+
},
310+
"/mi/{id}": {
311+
"get": {
312+
"description": "Returns 200 OK with management information.",
313+
"responses": {
314+
"200": {
315+
"description": "OK"
316+
},
317+
"400": {
318+
"description": "Bad request, invalid input data"
319+
},
320+
"404": {
321+
"description": "Resource not found"
322+
},
323+
"500": {
324+
"description": "Server error"
325+
}
326+
},
327+
"security": [
328+
{
329+
"LambdaAuthorizer": []
330+
}
331+
],
332+
"summary": "Get MI",
333+
"x-amazon-apigateway-integration": {
334+
"contentHandling": "CONVERT_TO_TEXT",
335+
"credentials": "${APIG_EXECUTION_ROLE_ARN}",
336+
"httpMethod": "POST",
337+
"passthroughBehavior": "WHEN_NO_TEMPLATES",
338+
"responses": {
339+
".*": {
340+
"statusCode": "200"
341+
}
342+
},
343+
"timeoutInMillis": 29000,
344+
"type": "AWS_PROXY",
345+
"uri": "arn:aws:apigateway:${AWS_REGION}:lambda:path/2015-03-31/functions/${GET_MI_LAMBDA_ARN}/invocations"
346+
}
347+
},
348+
"parameters": [
349+
{
350+
"description": "Unique identifier of this resource",
351+
"in": "path",
352+
"name": "id",
353+
"required": true,
354+
"schema": {
355+
"type": "string"
356+
}
357+
}
358+
]
309359
}
310360
}
311361
}

0 commit comments

Comments
 (0)