File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
infrastructure/stacks/api-layer Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ resource "aws_api_gateway_method" "get_patient_check" {
2+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
3+ resource_id = aws_api_gateway_resource. patient . id
4+ http_method = " GET"
5+ authorization = " NONE"
6+ api_key_required = false
7+
8+ depends_on = [
9+ aws_api_gateway_resource . patient ,
10+ aws_api_gateway_resource . patient_check ,
11+ ]
12+ }
13+
14+ resource "aws_api_gateway_integration" "get_patient_check" {
15+ rest_api_id = module. eligibility_signposting_api_gateway . rest_api_id
16+ resource_id = aws_api_gateway_resource. patient . id
17+ http_method = aws_api_gateway_method. get_patient_check . http_method
18+ integration_http_method = " POST" # Needed for lambda proxy integration
19+ type = " AWS_PROXY"
20+ uri = module. get_patient_check . invoke_arn # placeholder for the actual lambda function ARN
21+
22+ depends_on = [
23+ aws_api_gateway_method . get_patient_check
24+ ]
25+ }
26+
27+ resource "aws_lambda_permission" "get_patient_check" {
28+ statement_id = " AllowExecutionFromAPIGateway"
29+ action = " lambda:InvokeFunction"
30+ function_name = module. get_patient_check . function_name # placeholder for the actual lambda function name
31+ principal = " apigateway.amazonaws.com"
32+
33+ source_arn = " ${ module . eligibility_signposting_api_gateway . execution_arn } /*/*"
34+ }
You can’t perform that action at this time.
0 commit comments