Skip to content

Commit 303666a

Browse files
VIA-347 AS/SB Deploy fake api infra using TF
1 parent 9d50ffb commit 303666a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

infrastructure/environments/test/locals.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ locals {
4242

4343
MAX_SESSION_AGE_MINUTES = 59
4444

45-
ELIGIBILITY_API_ENDPOINT = "https://sandbox.api.service.nhs.uk/" // From fargate deployment
4645
IS_APIM_AUTH_ENABLED = false // Eventually use APIM mock
47-
APIM_AUTH_URL = "https://int.api.service.nhs.uk/oauth2/token" // From fargate deployment
4846
APIM_KEY_ID = "test-1"
4947

5048
AUTH_TRUST_HOST = "true"

infrastructure/environments/test/main.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,22 @@ module "deploy_lambda" {
1010
alerting_sns_topic_arn = module.deploy_monitoring.alerting_sns_topic_arn
1111
}
1212

13+
module "deploy_fake_api" {
14+
source = "./fake-api"
15+
}
16+
1317
module "deploy" {
1418
source = "../../modules/deploy_app"
1519

1620
prefix = local.prefix
1721
open-next-path = local.open_next_path
1822
nodejs_version = local.node_version
1923
log_retention_in_days = local.log_retention_in_days
20-
application_environment_variables = local.application_environment_variables
24+
application_environment_variables = merge(local.application_environment_variables,
25+
{
26+
ELIGIBILITY_API_ENDPOINT = module.deploy_fake_api.application_url,
27+
APIM_AUTH_URL = "${module.deploy_fake_api.application_url}/oauth2/token"
28+
})
2129
acm_certificate_arn = data.aws_acm_certificate.website.arn
2230
domain = local.domain
2331
sub_domain = local.sub_domain

0 commit comments

Comments
 (0)