From 3098dd4365eb0bc8cebe14c0d99f226157df4a59 Mon Sep 17 00:00:00 2001 From: Joel Courtney Date: Fri, 2 Aug 2019 16:59:14 +1000 Subject: [PATCH] Use lookup with default instead of coalesce --- groups/tagging.tf | 2 +- roles/tagging.tf | 2 +- user/tagging.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/groups/tagging.tf b/groups/tagging.tf index 6f8b523..2287786 100644 --- a/groups/tagging.tf +++ b/groups/tagging.tf @@ -1,7 +1,7 @@ locals { tf_module = "groups" tf_module_repo = "github.com/aceteknologi/terraform-iam" - tf_root_path = coalesce(var.tags["tf_path"], "unknown") + tf_root_path = lookup(var.tags, "tf_path", "unknown") } locals { diff --git a/roles/tagging.tf b/roles/tagging.tf index 34b2b34..9e9da9f 100644 --- a/roles/tagging.tf +++ b/roles/tagging.tf @@ -1,7 +1,7 @@ locals { tf_module = "roles" tf_module_repo = "github.com/aceteknologi/terraform-iam" - tf_root_path = coalesce(var.tags["tf_path"], "unknown") + tf_root_path = lookup(var.tags, "tf_path", "unknown") } locals { diff --git a/user/tagging.tf b/user/tagging.tf index aa9a5c4..4d871a8 100644 --- a/user/tagging.tf +++ b/user/tagging.tf @@ -1,7 +1,7 @@ locals { tf_module = "user" tf_module_repo = "github.com/aceteknologi/terraform-iam" - tf_root_path = coalesce(var.tags["tf_path"], "unknown") + tf_root_path = lookup(var.tags, "tf_path", "unknown") } locals {