Skip to content

Commit c7b1346

Browse files
committed
add parent_acct_environment
1 parent e2c0d81 commit c7b1346

File tree

5 files changed

+31
-18
lines changed

5 files changed

+31
-18
lines changed

infrastructure/terraform/components/app/module_backend_api.tf

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
module "backend_api" {
44
source = "../../modules/backend-api"
55

6-
project = var.project
7-
environment = var.environment
8-
component = var.component
9-
aws_account_id = var.aws_account_id
10-
region = var.region
11-
group = var.group
12-
csi = local.csi
13-
log_retention_in_days = var.log_retention_in_days
14-
kms_key_arn = module.kms.key_arn
6+
project = var.project
7+
environment = var.environment
8+
component = var.component
9+
aws_account_id = var.aws_account_id
10+
region = var.region
11+
group = var.group
12+
csi = local.csi
13+
log_retention_in_days = var.log_retention_in_days
14+
kms_key_arn = module.kms.key_arn
15+
parent_acct_environment = var.parent_acct_environment
1516

1617
cognito_config = jsondecode(aws_ssm_parameter.cognito_config.value)
1718

infrastructure/terraform/components/sandbox/module_backend_api.tf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
module "backend_api" {
22
source = "../../modules/backend-api"
33

4-
project = var.project
5-
environment = var.environment
6-
component = var.component
7-
aws_account_id = var.aws_account_id
8-
region = var.region
9-
group = var.group
10-
csi = local.csi
11-
log_retention_in_days = var.log_retention_in_days
4+
project = var.project
5+
environment = var.environment
6+
component = var.component
7+
aws_account_id = var.aws_account_id
8+
region = var.region
9+
group = var.group
10+
csi = local.csi
11+
log_retention_in_days = var.log_retention_in_days
12+
parent_acct_environment = "main"
1213

1314

1415
cognito_config = {

infrastructure/terraform/components/sandbox/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ variable "default_tags" {
4747
default = {}
4848
}
4949

50+
variable "parent_acct_environment" {
51+
type = string
52+
description = "Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments"
53+
default = "main"
54+
}
55+
5056
##
5157
# Variables specific to the "sandbox"component
5258
##
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
data "aws_ssm_parameter" "sftp_mock_config_acct" {
22
count = local.use_sftp_letter_supplier_mock ? 1 : 0
3-
name = "/nhs-notify-main-acct/sftp-mock-config"
3+
name = "/nhs-notify-${var.parent_acct_environment}-acct/sftp-mock-config"
44
}

infrastructure/terraform/modules/backend-api/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,8 @@ variable "letter_suppliers" {
9494
}))
9595
description = "Letter suppliers enabled in the environment"
9696
}
97+
98+
variable "parent_acct_environment" {
99+
type = string
100+
description = "Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments"
101+
}

0 commit comments

Comments
 (0)