File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module "user_restrictions_gateway" {
77 gateway_path = " UserRestriction"
88 authorizer_id = aws_api_gateway_authorizer. repo_authoriser . id
99 require_credentials = true
10- origin = contains ([ " prod " ], terraform . workspace ) ? " 'https:// ${ var . domain } ' " : " 'https:// ${ terraform . workspace } . ${ var . domain } ' "
10+ origin = local . base_url_with_quotes
1111}
1212
1313module "user_restriction_id_gateway" {
@@ -19,7 +19,7 @@ module "user_restriction_id_gateway" {
1919 authorization = " CUSTOM"
2020 authorizer_id = aws_api_gateway_authorizer. repo_authoriser . id
2121 require_credentials = true
22- origin = contains ([ " prod " ], terraform . workspace ) ? " 'https:// ${ var . domain } ' " : " 'https:// ${ terraform . workspace } . ${ var . domain } ' "
22+ origin = local . base_url_with_quotes
2323
2424 request_parameters = {
2525 " method.request.path.id" = true
@@ -35,5 +35,5 @@ module "user_restrictions_user_search_gateway" {
3535 authorization = " CUSTOM"
3636 authorizer_id = aws_api_gateway_authorizer. repo_authoriser . id
3737 require_credentials = true
38- origin = contains ([ " prod " ], terraform . workspace ) ? " 'https:// ${ var . domain } ' " : " 'https:// ${ terraform . workspace } . ${ var . domain } ' "
38+ origin = local . base_url_with_quotes
3939}
Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ module "get_user_information_lambda" {
1212 http_methods = [" GET" ]
1313 api_execution_arn = aws_api_gateway_rest_api. ndr_doc_store_api . execution_arn
1414 lambda_environment_variables = {
15- APPCONFIG_APPLICATION = module.ndr- app- config.app_config_application_id
16- APPCONFIG_ENVIRONMENT = module.ndr- app- config.app_config_environment_id
17- APPCONFIG_CONFIGURATION = module.ndr- app- config.app_config_configuration_profile_id
18- WORKSPACE = terraform.workspace
15+ APPCONFIG_APPLICATION = module.ndr- app- config.app_config_application_id
16+ APPCONFIG_ENVIRONMENT = module.ndr- app- config.app_config_environment_id
17+ APPCONFIG_CONFIGURATION = module.ndr- app- config.app_config_configuration_profile_id
18+ WORKSPACE = terraform.workspace
19+ HEALTHCARE_WORKER_API_URL = data.aws_ssm_parameter.healthcare_worker_api_base_url.value
1920 }
2021
2122 depends_on = [
Original file line number Diff line number Diff line change @@ -10,3 +10,6 @@ module "healthcare_worker_api_base_url" {
1010 ignore_value_changes = true
1111}
1212
13+ data "aws_ssm_parameter" "healthcare_worker_api_base_url" {
14+ name = " /ndr/${ var . shared_infra_workspace } /hcw_api_url"
15+ }
You can’t perform that action at this time.
0 commit comments