Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions infrastructure/lambda-document-upload-check.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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,
]
}

Expand Down
22 changes: 9 additions & 13 deletions infrastructure/lambda-get-document-fhir.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
module.ndr-lloyd-george-store.s3_read_policy_document,
Expand All @@ -51,21 +50,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,
]
Expand Down
4 changes: 0 additions & 4 deletions infrastructure/lambda-post-document-fhir.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -20,8 +19,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
Expand All @@ -30,7 +27,6 @@ module "post-document-references-fhir-lambda" {
}

depends_on = [
module.pdm_dynamodb_table,
module.core_dynamodb_table,
module.lloyd_george_reference_dynamodb_table,
]
Expand Down
5 changes: 1 addition & 4 deletions infrastructure/lambda-search-document-references-fhir.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -24,15 +22,14 @@ 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
}
depends_on = [
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,
]
Expand Down
Loading