Skip to content

Commit e8fb5f5

Browse files
henrydobsonaknysh
authored andcommitted
Fix var.regex_replace_chars implementation (#50)
1 parent c4e0de3 commit e8fb5f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ locals {
2727
names = "${concat(local.context_local["name"], list(""))}"
2828
name_context_or_default = "${length(local.names[0]) > 0 ? local.names[0] : var.name}"
2929
name_or_context = "${var.name != ""? var.name : local.name_context_or_default}"
30-
name = "${lower(replace(local.name_or_context, "/var.regex_replace_chars/", ""))}"
30+
name = "${lower(replace(local.name_or_context, "/${var.regex_replace_chars}/", ""))}"
3131
namespaces = "${concat(local.context_local["namespace"], list(""))}"
3232
namespace_context_or_default = "${length(local.namespaces[0]) > 0 ? local.namespaces[0] : var.namespace}"
3333
namespace_or_context = "${var.namespace != "" ? var.namespace : local.namespace_context_or_default}"
34-
namespace = "${lower(replace(local.namespace_or_context, "/var.regex_replace_chars/", ""))}"
34+
namespace = "${lower(replace(local.namespace_or_context, "/${var.regex_replace_chars}/", ""))}"
3535
environments = "${concat(local.context_local["environment"], list(""))}"
3636
environment_context_or_default = "${length(local.environments[0]) > 0 ? local.environments[0] : var.environment}"
3737
environment_or_context = "${var.environment != "" ? var.environment : local.environment_context_or_default}"
38-
environment = "${lower(replace(local.environment_or_context, "/var.regex_replace_chars/", ""))}"
38+
environment = "${lower(replace(local.environment_or_context, "/${var.regex_replace_chars}/", ""))}"
3939
stages = "${concat(local.context_local["stage"], list(""))}"
4040
stage_context_or_default = "${length(local.stages[0]) > 0 ? local.stages[0] : var.stage}"
4141
stage_or_context = "${var.stage != "" ? var.stage : local.stage_context_or_default}"
42-
stage = "${lower(replace(local.stage_or_context, "/var.regex_replace_chars/", ""))}"
42+
stage = "${lower(replace(local.stage_or_context, "/${var.regex_replace_chars}/", ""))}"
4343
delimiters = "${concat(local.context_local["delimiter"], list(""))}"
4444
delimiter_context_or_default = "${length(local.delimiters[0]) > 0 ? local.delimiters[0] : var.delimiter}"
4545
delimiter = "${var.delimiter != "-" ? var.delimiter : local.delimiter_context_or_default}"

0 commit comments

Comments
 (0)