Skip to content

Commit

Permalink
add distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Dec 17, 2020
1 parent bf38d7b commit 4a51407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ locals {
# strip spaces, convert to lowercase, make distinct, sort. Remove those not in the _defaults
add_safeguard_tags = local.enable_title26 ? ["title26"] : []
_default_safeguard_tags = { for d in local._defaults["data_safeguards"] : d => d }
safeguard_tags = sort(compact(concat([for t in var.data_safeguards : lookup(local._default_safeguard_tags, lower(replace(t, " ", "")), "")], local.add_safeguard_tags)))
safeguard_tags = sort(distinct(compact(concat([for t in var.data_safeguards : lookup(local._default_safeguard_tags, lower(replace(t, " ", "")), "")], local.add_safeguard_tags))))
add_tags = {
safeguard = {
"exists" = { "boc:safeguard" = join(",", local.safeguard_tags) }
Expand Down

0 comments on commit 4a51407

Please sign in to comment.