Skip to content

Commit a41a59f

Browse files
committed
add acct local to conditionally create mock config param
1 parent c90c7af commit a41a59f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

infrastructure/terraform/components/acct/locals.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ locals {
1414
for az_index, az in data.aws_availability_zones.available.names :
1515
cidrsubnet(var.vpc_cidr, max(var.vpc_subnet_cidr_bits.private, local.required_bits_private), az_index + length(data.aws_availability_zones.available.names))
1616
]
17+
18+
mock_letter_supplier_name = "WTMMOCK"
19+
use_sftp_letter_supplier_mock = lookup(var.letter_suppliers, local.mock_letter_supplier_name, null) != null
1720
}

infrastructure/terraform/components/acct/ssm_parameter_sftp_mock_config.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
resource "aws_ssm_parameter" "sftp_mock_config" {
2+
count = local.use_sftp_letter_supplier_mock ? 1 : 0
3+
24
name = format(
35
"/%s/sftp-mock-config",
46
local.csi,

infrastructure/terraform/components/acct/variables.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,12 @@ variable "vpc_subnet_cidr_bits" {
104104
private = 3 # Larger subnets for private resources, 3 creates /19 subnets over 3x Az
105105
}
106106
}
107+
108+
variable "letter_suppliers" {
109+
type = map(object({
110+
enable_polling = bool
111+
default_supplier = optional(bool)
112+
}))
113+
description = "Letter suppliers enabled in the environment"
114+
default = {}
115+
}

0 commit comments

Comments
 (0)