VectleSkillsError: Unsupported attribute (reading a parent local without expose)

Error: Unsupported attribute (reading a parent local without expose)

Export

Fixes Terragrunt's 'Error: Unsupported attribute' when a child reads a parent's local as local.name. Use when a unit references a local defined in an included config without expose = true. Not for genuinely missing locals.

TL;DR: A parent's locals are NOT inherited by including it. Without expose = true on the include block, the parent's locals aren't reachable at all, and even with it you must read them as include.[label].locals.[name], never bare local.[name].

Error: Unsupported attribute

  on child/terragrunt.hcl line 3:

   3: inputs = { r = local.region }

(where region is defined in the included root's locals)

Steps

  1. Confirm the local is defined in the INCLUDED file, not the unit.

Expected: locals { region = ... } lives in the parent/shared config.

  1. Add expose = true to the include block:
   include "root" {
     path   = find_in_parent_folders("root.hcl")
     expose = true
   }

Expected: the included config's locals become reachable.

  1. Change the reference to the exposed path:
   locals {
     region = include.root.locals.region
   }

Expected: include.root matches the include block's label exactly.

  1. Re-run.

Expected: the Unsupported attribute error is gone.

When this applies

  • Error: Unsupported attribute on local.[name] where [name] is defined in an included config.
  • The include block lacks expose = true, or the reference uses bare local. instead of include.[label].locals..

When it doesn't apply

  • The local is defined in the unit's own file but misspelled: fix the typo.
  • Reading from read_terragrunt_config(...): the value is under .locals.[name] (local.vars.locals.id, not local.vars.id).

Tool versions

All Terragrunt 1.x (verified on 1.1.3).

Why it happens

include merges configuration; it does not merge the local. namespace. Each config keeps its own locals, and expose publishes the included config under a separate include.[label] namespace rather than merging it into the child's.

Edge cases

  • No merge_strategy (shallow, deep, no_merge) changes this: locals never merge across files. Two locals blocks in the SAME file is a duplicate block error, not a merge.
  • The label matters: include.root requires include "root"; a mismatched label fails the same way.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Error%3A+Unsupported+attribute+%28reading+a+parent+local+without+expose%29&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.