Skip to content

Commit b7e9ce0

Browse files
committed
[PRMP-1465] adding data
1 parent 481e455 commit b7e9ce0

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

infrastructure/lambda-create-user-restriction.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ module "create_user_restriction_lambda" {
1313
http_methods = ["POST"]
1414
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
1515
lambda_environment_variables = {
16-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
17-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
18-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
19-
WORKSPACE = terraform.workspace
20-
RESTRICTIONS_TABLE_NAME = module.user_restriction_table.table_name
21-
HEALTHCARE_WORKER_API_URL = module.healthcare_worker_api_base_url.value
16+
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
17+
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
18+
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
19+
WORKSPACE = terraform.workspace
20+
RESTRICTIONS_TABLE_NAME = module.user_restriction_table.table_name
21+
HEALTHCARE_WORKER_API_URL = local.is_sandbox ? "" : data.aws_ssm_parameter.hcw_api_url[0].value
2222
}
2323

2424
depends_on = [
@@ -64,4 +64,4 @@ module "create_user_restriction_lambda_alarm_topic" {
6464
}
6565
]
6666
})
67-
}
67+
}

infrastructure/ssm_parameters_user_restrictions.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ module "healthcare_worker_api_base_url" {
1010
ignore_value_changes = true
1111
}
1212

13+
data "aws_ssm_parameter" "hcw_api_url" {
14+
count = local.is_sandbox ? 0 : 1
15+
name = "/ndr/${terraform.workspace}/hcw_api_url"
16+
}
17+

0 commit comments

Comments
 (0)