Best way to refer to lower hiera config file

So I have this structure:

└── project
    ├── dev
    │   ├── env.hcl
    │   └── something
    │       └── terragrunt.hcl
    └── project.hcl

Where project.hcl and env.hcl are just config files with locals.
I load them inside something/terragrunt.hcl with read_terragrunt_config(find_in_parent_folders("project.hcl / env.hcl ")).

What I’m looking to achieve is to set some global local for the project based on values in the env locals. For example.

  env = "dev"


  env = read_terragrunt_config(???)
  log_name = "${}-logs"

The issue is how to refer from project.hcl to the env.hcl of my current env. Since I’m calling read_terragrunt_config() from something/terragrunt.hcl which is in dev I might have the information somewhere no?

The only solution I have right now is to repeat that “log_name” local in every environment.

Hi, apologies for the delay in responding here.

Assuming project.hcl is loaded using include and not read_terragrunt_config, you can use path_relative_to_include to get to the child terragrunt.hcl folder from the parent.

Best regards,

But if I understood correctly you can only have 1 include block. I’m already reserving that for my backend / providers setups.

I haven’t tested yet but can 1 include have another include. terragrunt.hcl --include–> nonprod.hcl --include–> global.hcl ?