-
The subject is the best way to describe what I am trying to do. I am trying to merge a local that appears down in the filesystem into a local that is in The error that I am getting is:
This is how I have things setup.
locals {
aws_account_alias= "networking-${local.environment}-01"
}
locals {
account_id = "12345678901"
environment = "dev"
}
locals {
aws_region = "us-east-1"
}
include "root" {
path = find_in_parent_folders()
}
This is the relevant part of locals {
account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
common_vars = read_terragrunt_config(find_in_parent_folders("_common/common.hcl"))
} Are locals evaluated in the order they are included? Thanks for any help you can provide. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I should add. I am testing this with |
Beta Was this translation helpful? Give feedback.
-
Hello, I also prepared simplified example in https://github.com/denis256/terragrunt-tests/tree/master/discussion-734 References: https://terragrunt.gruntwork.io/docs/reference/built-in-functions/#read_terragrunt_config |
Beta Was this translation helpful? Give feedback.
Hello,
configuration can be extracted to separated HCL file and loaded in parent file through
read_terragrunt_config()
using functions to get pathsget_terragrunt_dir()
orpath_relative_to_include()
I also prepared simplified example in https://github.com/denis256/terragrunt-tests/tree/master/discussion-734
References:
https://terragrunt.gruntwork.io/docs/reference/built-in-functions/#read_terragrunt_config
https://terragrunt.gruntwork.io/docs/reference/built-in-functions/#get_terragrunt_dir
https://terragrunt.gruntwork.io/docs/reference/built-in-functions/#path_relative_to_include