From eefade236b5ca8463e461723c41a002bed57e905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Adolfo=20Mej=C3=ADa=20S=C3=A1nchez?= Date: Wed, 20 Nov 2024 19:42:07 -0500 Subject: [PATCH] Update hcl.html.markdown fixing syntax error in filtered_list and prefixed_list --- hcl.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcl.html.markdown b/hcl.html.markdown index 4ab26842..221ed577 100644 --- a/hcl.html.markdown +++ b/hcl.html.markdown @@ -281,9 +281,9 @@ locals { map = {for x in local.list : x => upper(x) } // "one":"ONE", "two":"TWO", "three":"THREE" - filtered_list = [for k, v in local.map : substr(v, 0, 2) if k != "two" } // "ON", "TH" + filtered_list = [for k, v in local.map : substr(v, 0, 2) if k != "two" ] // "ON", "TH" - prefixed_list = [for v in local.filtered_list : "pre-${k}" } // "pre-ON", "pre-TH" + prefixed_list = [for v in local.filtered_list : "pre-${v}" ] // "pre-ON", "pre-TH" joined_list = join(local.upper_list,local. filtered_list) // "ONE", "TWO", "THREE", "pre-ON", "pre-TH"