From 941d13fc13a4887f11cf1cd63285fc3801abce09 Mon Sep 17 00:00:00 2001 From: badra001 Date: Tue, 4 Nov 2025 10:35:48 -0500 Subject: [PATCH] - 0.2.1 -- 2025-11-04 - tags - fix case for roles with no tags.yml --- CHANGELOG.md | 4 ++++ common/version.tf | 2 +- tags/tags.finops.tf | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec6d66..6181e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,3 +15,7 @@ - 0.2.0 -- 2025-07-29 - add base-label - add prefixes + +- 0.2.1 -- 2025-11-04 + - tags + - fix case for roles with no tags.yml diff --git a/common/version.tf b/common/version.tf index 1a8debc..ad48329 100644 --- a/common/version.tf +++ b/common/version.tf @@ -1,4 +1,4 @@ locals { - _module_version = "0.2.0" + _module_version = "0.2.1" _module_name = "boc-nts" } diff --git a/tags/tags.finops.tf b/tags/tags.finops.tf index 4920781..bed846c 100644 --- a/tags/tags.finops.tf +++ b/tags/tags.finops.tf @@ -7,7 +7,7 @@ locals { project_role = local._finops.role != null ? replace(replace(local._finops.role, "+", format("%v_", local._finops.name)), "/[^a-z0-9_]/", "") : null } finops_tags = { for k, v in local._finops_tags : k => v if v != null && k != "prefix" } - finops_roles = [for r in lookup(local.tags_in.finops, "roles", []) : lower(r)] + finops_roles = [for r in try(local.tags_in.finops["roles"], try(local.var.finops["roles"],[])) : lower(r)] } resource "terraform_data" "finops" {