From 91fd56c3ca84067512b05c762ce34b138dd61c04 Mon Sep 17 00:00:00 2001 From: NogaNHS <127490765+NogaNHS@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:22:05 +0000 Subject: [PATCH] [PRMP-1446] Add healthcare worker API URL to user restriction lambda environment Signed-off-by: NogaNHS <127490765+NogaNHS@users.noreply.github.com> --- infrastructure/lambda-search-user-restriction.tf | 11 ++++++----- infrastructure/ssm_parameters_user_restrictions.tf | 3 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/infrastructure/lambda-search-user-restriction.tf b/infrastructure/lambda-search-user-restriction.tf index 742e7003..e554df08 100644 --- a/infrastructure/lambda-search-user-restriction.tf +++ b/infrastructure/lambda-search-user-restriction.tf @@ -13,11 +13,12 @@ module "search_user_restriction_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 - RESTRICTIONS_TABLE_NAME = module.user_restriction_table.table_name + 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 + RESTRICTIONS_TABLE_NAME = module.user_restriction_table.table_name + HEALTHCARE_WORKER_API_URL = data.aws_ssm_parameter.healthcare_worker_api_base_url.value } depends_on = [ diff --git a/infrastructure/ssm_parameters_user_restrictions.tf b/infrastructure/ssm_parameters_user_restrictions.tf index 641f985e..192512b1 100644 --- a/infrastructure/ssm_parameters_user_restrictions.tf +++ b/infrastructure/ssm_parameters_user_restrictions.tf @@ -10,3 +10,6 @@ module "healthcare_worker_api_base_url" { ignore_value_changes = true } +data "aws_ssm_parameter" "healthcare_worker_api_base_url" { + name = "/ndr/${var.shared_infra_workspace}/hcw_api_url" +} \ No newline at end of file