In a file that /home/me/infra/app/terragrunt.hcl reads with read_terragrunt_config.
locals { unit_dir = get_original_terragrunt_dir() # "/home/me/infra/app"}get_original_terragrunt_dir() --> stringIn a file read with read_terragrunt_config, get_terragrunt_dir returns that file’s directory. get_original_terragrunt_dir returns the directory of the unit that reads it:
locals { name = basename(get_original_terragrunt_dir())}locals { naming = read_terragrunt_config("../shared/naming.hcl")}
inputs = { name = local.naming.locals.name}name is app. When a stack file reads the file, it returns the stack file’s directory.
In a file that /home/me/infra/app/terragrunt.hcl reads with read_terragrunt_config.
locals { unit_dir = get_original_terragrunt_dir() # "/home/me/infra/app"}