File tree Expand file tree Collapse file tree 3 files changed +24
-9
lines changed
Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,17 @@ module "get-doc-fhir-lambda" {
5555 WORKSPACE = terraform.workspace
5656 ENVIRONMENT = var.environment
5757 PRESIGNED_ASSUME_ROLE = aws_iam_role.get_fhir_doc_presign_url_role.arn
58- LLOYD_GEORGE_DYNAMODB_NAME = " ${ terraform . workspace } _${ var . lloyd_george_dynamodb_table_name } "
58+ LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name
59+ PDM_DYNAMODB_NAME = module.pdm_dynamodb_table.table_name
5960 OIDC_CALLBACK_URL = contains ([" prod" ], terraform. workspace ) ? " https://${ var . domain } /auth-callback" : " https://${ terraform . workspace } .${ var . domain } /auth-callback"
6061 CLOUDFRONT_URL = module.cloudfront- distribution- lg.cloudfront_url
6162 PDS_FHIR_IS_STUBBED = local.is_sandbox
6263 }
63- depends_on = [aws_api_gateway_method . get_document_reference ]
64+ depends_on = [
65+ aws_api_gateway_method . get_document_reference ,
66+ module . pdm_dynamodb_table ,
67+ module . lloyd_george_reference_dynamodb_table ,
68+ ]
6469}
6570
6671resource "aws_api_gateway_integration" "get_doc_fhir_lambda_integration" {
@@ -83,4 +88,5 @@ resource "aws_lambda_permission" "lambda_permission_get_mtls_api" {
8388 # The "/*/*" portion grants access from any method on any resource
8489 # within the API Gateway REST API.
8590 source_arn = " ${ aws_api_gateway_rest_api . ndr_doc_store_api_mtls . execution_arn } /*/*"
86- }
91+ }
92+
Original file line number Diff line number Diff line change @@ -18,14 +18,19 @@ module "post-document-references-fhir-lambda" {
1818 APPCONFIG_APPLICATION = module.ndr- app- config.app_config_application_id
1919 APPCONFIG_ENVIRONMENT = module.ndr- app- config.app_config_environment_id
2020 APPCONFIG_CONFIGURATION = module.ndr- app- config.app_config_configuration_profile_id
21- DOCUMENT_STORE_DYNAMODB_NAME = " ${ terraform . workspace } _ ${ var . docstore_dynamodb_table_name } "
22- LLOYD_GEORGE_DYNAMODB_NAME = " ${ terraform . workspace } _ ${ var . lloyd_george_dynamodb_table_name } "
21+ LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name
22+ PDM_DYNAMODB_NAME = module.pdm_dynamodb_table.table_name
2323 STAGING_STORE_BUCKET_NAME = " ${ terraform . workspace } -${ var . staging_store_bucket_name } "
2424 DOCUMENT_RETRIEVE_ENDPOINT_APIM = " ${ local . apim_api_url } /DocumentReference"
2525 PDS_FHIR_IS_STUBBED = local.is_sandbox
2626 WORKSPACE = terraform.workspace
2727 PRESIGNED_ASSUME_ROLE = aws_iam_role.create_post_presign_url_role.arn
2828 }
29+
30+ depends_on = [
31+ module . pdm_dynamodb_table ,
32+ module . lloyd_george_reference_dynamodb_table ,
33+ ]
2934}
3035
3136resource "aws_api_gateway_integration" "post_doc_fhir_lambda_integration" {
@@ -48,4 +53,5 @@ resource "aws_lambda_permission" "lambda_permission_post_mtls_api" {
4853 # The "/*/*" portion grants access from any method on any resource
4954 # within the API Gateway REST API.
5055 source_arn = " ${ aws_api_gateway_rest_api . ndr_doc_store_api_mtls . execution_arn } /*/*"
51- }
56+ }
57+
Original file line number Diff line number Diff line change @@ -20,14 +20,16 @@ module "search-document-references-fhir-lambda" {
2020 APPCONFIG_APPLICATION = module.ndr- app- config.app_config_application_id
2121 APPCONFIG_ENVIRONMENT = module.ndr- app- config.app_config_environment_id
2222 APPCONFIG_CONFIGURATION = module.ndr- app- config.app_config_configuration_profile_id
23- DYNAMODB_TABLE_LIST = " [\u0022 ${ terraform . workspace } _ ${ var . docstore_dynamodb_table_name } \u0022 , \u0022 ${ terraform . workspace } _ ${ var . lloyd_george_dynamodb_table_name } \u0022 ]"
23+ DYNAMODB_TABLE_LIST = " [\u0022 ${ module . pdm_dynamodb_table . table_name } \u0022 , \u0022 ${ module . lloyd_george_reference_dynamodb_table . table_name } \u0022 ]"
2424 DOCUMENT_RETRIEVE_ENDPOINT_APIM = " ${ local . apim_api_url } /DocumentReference"
2525 WORKSPACE = terraform.workspace
2626 }
2727 depends_on = [
2828 aws_api_gateway_rest_api . ndr_doc_store_api ,
2929 module . search-document-references-gateway ,
30- module . ndr-app-config
30+ module . ndr-app-config ,
31+ module . pdm_dynamodb_table ,
32+ module . lloyd_george_reference_dynamodb_table ,
3133 ]
3234}
3335
@@ -50,4 +52,5 @@ resource "aws_lambda_permission" "lambda_permission_search_mtls_api" {
5052 # The "/*/*" portion grants access from any method on any resource
5153 # within the API Gateway REST API.
5254 source_arn = " ${ aws_api_gateway_rest_api . ndr_doc_store_api_mtls . execution_arn } /*/*"
53- }
55+ }
56+
You can’t perform that action at this time.
0 commit comments