Terragrunt: Is it possible to use terraform `locals.tf` within Terragrunt

Hello, I’ve a small question. Is it possible to use terraform variables/locals within terragrunt'? Basically I've a big block of tags defined inside oflocals.tffile, so I would like to use them with terragrunt.hcl`


  • place them in locals.hcl and load them in terragraunt with tags_locals = read_terragrunt_config(find_in_parent_folders(“locals.hcl”)) then pass value via a variable in your module:
variable "tags"{
  type = maps()

input = {
  tags = local.tags_locals.locals.tags
  • output the block of tags from the module
output "tags"{
value = XXX

other terragrunt.hcl
dependency "source_tags" {
  config_path = "../XYZ"

inputs = {
  tags = dependency.source_tags.outputs.tags
1 Like