From 831e20897e0541ccc9731dd3f71536212d6da9d2 Mon Sep 17 00:00:00 2001 From: badra001 Date: Mon, 9 May 2022 13:51:29 -0400 Subject: [PATCH] change map() to {} --- README.md | 2 +- main.tf | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fe5f5b8..55c9a00 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ No requirements. | Name | Source | Version | |------|--------|---------| -| [user\_email](#module\_user\_email) | git@github.e.it.census.gov:terraform-modules/ldap-get-attribute.git | | +| [user\_email](#module\_user\_email) | git@github.e.it.census.gov:terraform-modules/ldap-get-attribute.git | n/a | ## Resources diff --git a/main.tf b/main.tf index 2ccbfdb..218acf0 100644 --- a/main.tf +++ b/main.tf @@ -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 @@ -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" + }, ) }