Skip to content

Commit

Permalink
change map() to {}
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 9, 2022
1 parent 00f8f29 commit 831e208
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ No requirements.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_user_email"></a> [user\_email](#module\_user\_email) | git@github.e.it.census.gov:terraform-modules/ldap-get-attribute.git | |
| <a name="module_user_email"></a> [user\_email](#module\_user\_email) | git@github.e.it.census.gov:terraform-modules/ldap-get-attribute.git | n/a |

## Resources

Expand Down
10 changes: 6 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ locals {
"parts" = split("/", arn)
}]
attached_policies = { for v in local.ap2 : element(v.parts, length(v.parts) - 1) => v.policy }
tags_username = var.service_account ? map("boc:id:contact", local.username) : map("boc:id:username", local.username)
tags_username = var.service_account ? { "boc:id:contact" = local.username } : { "boc:id:username" = local.username }
tags_email = {
"exists" = {
"boc:id:mail" = local.email_address
}
not_exists = {}
}
tags_service = var.service_account ? map("boc:id:service_account", "true") : {}
tags_service = var.service_account ? { "boc:id:service_account" = "true" } : {}
tags_reference = {
exists = {
"boc:id:reference" = var.reference
Expand All @@ -75,8 +75,10 @@ locals {
local.tags_email[local.email_address != "" ? "exists" : "not_exists"],
local.tags_service,
local.tags_reference[var.reference != "" ? "exists" : "not_exists"],
map("boc:tf_module_version", local._module_version),
map("boc:created_by", "terraform"),
{
"boc:tf_module_version" = local._module_version
"boc:created_by" = "terraform"
},
)
}

Expand Down

0 comments on commit 831e208

Please sign in to comment.