Skip to content

Commit c6176e9

Browse files
committed
[NRL-760] Fix sandbox env name in infra stack deployment
1 parent b24d706 commit c6176e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

terraform/infrastructure/locals.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
locals {
22
region = "eu-west-2"
33
project = "nhsd-nrlf"
4-
environment = var.account_name
54
stack_name = terraform.workspace
65
deletion_protection = var.deletion_protection
76
prefix = "${local.project}--${local.stack_name}"
8-
shared_prefix = "${local.project}--${local.environment}"
97

108
kms = {
119
deletion_window_in_days = 7
@@ -23,8 +21,10 @@ locals {
2321
}
2422
dynamodb_timeout_seconds = "3"
2523

26-
is_sandbox_env = length(regexall("-sandbox", local.environment)) > 0
24+
is_sandbox_env = length(regexall("-sandbox-", local.stack_name)) > 0
2725

26+
environment = local.is_sandbox_env ? "${var.account_name}-sandbox" : var.account_name
27+
shared_prefix = "${local.project}--${local.environment}"
2828
public_domain = local.is_sandbox_env ? var.public_sandbox_domain : var.public_domain
2929

3030
# Logic / vars for splunk environment

0 commit comments

Comments
 (0)