From ef394abd215b77a193542fb25df65c9ddbac3c6d Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Tue, 13 May 2025 17:56:43 -0400 Subject: [PATCH] add prefixes into locals context --- lab/root.hcl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lab/root.hcl b/lab/root.hcl index be5a3fd..32daece 100644 --- a/lab/root.hcl +++ b/lab/root.hcl @@ -15,6 +15,9 @@ locals { # Automatically load _envcommon, cross account and environment common variables common_vars = read_terragrunt_config(find_in_parent_folders("./_envcommon/common-variables.hcl")) + # Automatically load naming prefixes + prefixes = read_terragrunt_config(find_in_parent_folders("./_envcommon/prefixes.hcl")) + # Automatically load region-level variables region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl")) @@ -24,15 +27,11 @@ locals { # Automatically load vpc-level variables vpc_vars = read_terragrunt_config(find_in_parent_folders("vpc.hcl")) - # Check if copy_images.tf exists in the module directory - has_copy_images = fileexists("${get_original_terragrunt_dir()}/copy_images.tf") - # Add any other locals you want to expose # only expose things not already included via local.xxx_vars.locals.* root_locals_for_inputs = { is_module_enabled = local.is_module_enabled module_name = local.module_name - has_copy_images = local.has_copy_images } # Extract the variables we need for easy access