diff --git a/infrastructure/lambda-document-upload-check.tf b/infrastructure/lambda-document-upload-check.tf index 61d09d715..f66800c58 100644 --- a/infrastructure/lambda-document-upload-check.tf +++ b/infrastructure/lambda-document-upload-check.tf @@ -10,8 +10,6 @@ module "document_upload_check_lambda" { aws_iam_policy.ssm_access_policy.policy, module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document, module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document, - module.pdm_dynamodb_table.dynamodb_read_policy_document, - module.pdm_dynamodb_table.dynamodb_write_policy_document, data.aws_iam_policy.aws_lambda_vpc_access_execution_role.policy, module.document_upload_review_dynamodb_table.dynamodb_read_policy_document, module.document_upload_review_dynamodb_table.dynamodb_write_policy_document, @@ -24,9 +22,7 @@ module "document_upload_check_lambda" { http_methods = null api_execution_arn = null lambda_environment_variables = { - LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name DOCUMENT_REVIEW_DYNAMODB_NAME = module.document_upload_review_dynamodb_table.table_name - PDM_DYNAMODB_NAME = module.pdm_dynamodb_table.table_name STAGING_STORE_BUCKET_NAME = module.ndr-bulk-staging-store.bucket_id LLOYD_GEORGE_BUCKET_NAME = module.ndr-lloyd-george-store.bucket_id PDM_BUCKET_NAME = module.pdm-document-store.bucket_id @@ -45,6 +41,7 @@ module "document_upload_check_lambda" { module.ndr-bulk-staging-store, module.ndr-lloyd-george-store, module.lloyd_george_reference_dynamodb_table, + module.core_dynamodb_table, ] } diff --git a/infrastructure/lambda-get-document-fhir.tf b/infrastructure/lambda-get-document-fhir.tf index 67bab86e0..f2b0168c7 100644 --- a/infrastructure/lambda-get-document-fhir.tf +++ b/infrastructure/lambda-get-document-fhir.tf @@ -39,7 +39,6 @@ module "get-doc-fhir-lambda" { iam_role_policy_documents = [ module.ndr-app-config.app_config_policy, module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document, - module.pdm_dynamodb_table.dynamodb_read_policy_document, module.core_dynamodb_table.dynamodb_read_policy_document, aws_iam_policy.ssm_access_policy.policy, aws_iam_policy.mtls_access_ssm_policy.policy, @@ -52,21 +51,18 @@ module "get-doc-fhir-lambda" { http_methods = ["GET"] api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn lambda_environment_variables = { - APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id - APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id - APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id - WORKSPACE = terraform.workspace - ENVIRONMENT = var.environment - PRESIGNED_ASSUME_ROLE = aws_iam_role.get_fhir_doc_presign_url_role.arn - LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name - PDM_DYNAMODB_NAME = module.pdm_dynamodb_table.table_name - OIDC_CALLBACK_URL = contains(["prod"], terraform.workspace) ? "https://${var.domain}/auth-callback" : "https://${terraform.workspace}.${var.domain}/auth-callback" - CLOUDFRONT_URL = aws_cloudfront_distribution.s3_presign_mask.domain_name - PDS_FHIR_IS_STUBBED = local.is_sandbox + APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id + APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id + APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id + WORKSPACE = terraform.workspace + ENVIRONMENT = var.environment + PRESIGNED_ASSUME_ROLE = aws_iam_role.get_fhir_doc_presign_url_role.arn + OIDC_CALLBACK_URL = contains(["prod"], terraform.workspace) ? "https://${var.domain}/auth-callback" : "https://${terraform.workspace}.${var.domain}/auth-callback" + CLOUDFRONT_URL = aws_cloudfront_distribution.s3_presign_mask.domain_name + PDS_FHIR_IS_STUBBED = local.is_sandbox } depends_on = [ aws_api_gateway_method.get_document_reference, - module.pdm_dynamodb_table, module.lloyd_george_reference_dynamodb_table, module.core_dynamodb_table, ] diff --git a/infrastructure/lambda-post-document-fhir.tf b/infrastructure/lambda-post-document-fhir.tf index a1bf5fed0..b88a92e83 100644 --- a/infrastructure/lambda-post-document-fhir.tf +++ b/infrastructure/lambda-post-document-fhir.tf @@ -5,7 +5,6 @@ module "post-document-references-fhir-lambda" { iam_role_policy_documents = [ module.document_reference_dynamodb_table.dynamodb_write_policy_document, module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document, - module.pdm_dynamodb_table.dynamodb_write_policy_document, module.core_dynamodb_table.dynamodb_write_policy_document, module.ndr-bulk-staging-store.s3_write_policy_document, module.ndr-app-config.app_config_policy, @@ -21,8 +20,6 @@ module "post-document-references-fhir-lambda" { APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id - LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name - PDM_DYNAMODB_NAME = module.pdm_dynamodb_table.table_name STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}" DOCUMENT_RETRIEVE_ENDPOINT_APIM = "${local.apim_api_url}/DocumentReference" PDS_FHIR_IS_STUBBED = local.is_sandbox @@ -31,7 +28,6 @@ module "post-document-references-fhir-lambda" { } depends_on = [ - module.pdm_dynamodb_table, module.core_dynamodb_table, module.lloyd_george_reference_dynamodb_table, ] diff --git a/infrastructure/lambda-search-document-references-fhir.tf b/infrastructure/lambda-search-document-references-fhir.tf index c55a36ce6..01f06d7ce 100644 --- a/infrastructure/lambda-search-document-references-fhir.tf +++ b/infrastructure/lambda-search-document-references-fhir.tf @@ -7,8 +7,6 @@ module "search-document-references-fhir-lambda" { module.document_reference_dynamodb_table.dynamodb_write_policy_document, module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document, module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document, - module.pdm_dynamodb_table.dynamodb_read_policy_document, - module.pdm_dynamodb_table.dynamodb_write_policy_document, module.core_dynamodb_table.dynamodb_read_policy_document, module.core_dynamodb_table.dynamodb_write_policy_document, module.ndr-lloyd-george-store.s3_read_policy_document, @@ -26,7 +24,7 @@ module "search-document-references-fhir-lambda" { APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id - DYNAMODB_TABLE_LIST = "[\u0022${module.pdm_dynamodb_table.table_name}\u0022, \u0022${module.lloyd_george_reference_dynamodb_table.table_name}\u0022]" + DYNAMODB_TABLE_LIST = "[\u0022${module.core_dynamodb_table.table_name}\u0022, \u0022${module.lloyd_george_reference_dynamodb_table.table_name}\u0022]" DOCUMENT_RETRIEVE_ENDPOINT_APIM = "${local.apim_api_url}/DocumentReference" WORKSPACE = terraform.workspace } @@ -34,7 +32,6 @@ module "search-document-references-fhir-lambda" { aws_api_gateway_rest_api.ndr_doc_store_api, module.search-document-references-gateway, module.ndr-app-config, - module.pdm_dynamodb_table, module.core_dynamodb_table, module.lloyd_george_reference_dynamodb_table, ]