Skip to content

Commit

Permalink
Fix var.regex_replace_chars implementation (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrydobson authored and aknysh committed Feb 14, 2019
1 parent c4e0de3 commit e8fb5f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ locals {
names = "${concat(local.context_local["name"], list(""))}"
name_context_or_default = "${length(local.names[0]) > 0 ? local.names[0] : var.name}"
name_or_context = "${var.name != ""? var.name : local.name_context_or_default}"
name = "${lower(replace(local.name_or_context, "/var.regex_replace_chars/", ""))}"
name = "${lower(replace(local.name_or_context, "/${var.regex_replace_chars}/", ""))}"
namespaces = "${concat(local.context_local["namespace"], list(""))}"
namespace_context_or_default = "${length(local.namespaces[0]) > 0 ? local.namespaces[0] : var.namespace}"
namespace_or_context = "${var.namespace != "" ? var.namespace : local.namespace_context_or_default}"
namespace = "${lower(replace(local.namespace_or_context, "/var.regex_replace_chars/", ""))}"
namespace = "${lower(replace(local.namespace_or_context, "/${var.regex_replace_chars}/", ""))}"
environments = "${concat(local.context_local["environment"], list(""))}"
environment_context_or_default = "${length(local.environments[0]) > 0 ? local.environments[0] : var.environment}"
environment_or_context = "${var.environment != "" ? var.environment : local.environment_context_or_default}"
environment = "${lower(replace(local.environment_or_context, "/var.regex_replace_chars/", ""))}"
environment = "${lower(replace(local.environment_or_context, "/${var.regex_replace_chars}/", ""))}"
stages = "${concat(local.context_local["stage"], list(""))}"
stage_context_or_default = "${length(local.stages[0]) > 0 ? local.stages[0] : var.stage}"
stage_or_context = "${var.stage != "" ? var.stage : local.stage_context_or_default}"
stage = "${lower(replace(local.stage_or_context, "/var.regex_replace_chars/", ""))}"
stage = "${lower(replace(local.stage_or_context, "/${var.regex_replace_chars}/", ""))}"
delimiters = "${concat(local.context_local["delimiter"], list(""))}"
delimiter_context_or_default = "${length(local.delimiters[0]) > 0 ? local.delimiters[0] : var.delimiter}"
delimiter = "${var.delimiter != "-" ? var.delimiter : local.delimiter_context_or_default}"
Expand Down

0 comments on commit e8fb5f5

Please sign in to comment.