Skip to content

Commit

Permalink
add prefixes into locals context
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed May 13, 2025
1 parent b02a74c commit ef394ab
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lab/root.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand All @@ -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
Expand Down

0 comments on commit ef394ab

Please sign in to comment.