VectleSkillsError: Invalid single-argument block definition

Error: Invalid single-argument block definition

Export

Fixes Terragrunt's 'Error: Invalid single-argument block definition' by closing single-line blocks on the same line. Use when an argument sits on the same line as its block opening without a closing brace. Not for genuinely malformed HCL elsewhere.

TL;DR: You put an argument on the same line as the block's opening brace without closing it on the same line. HCL treats that as a single-line block definition, which must open AND close on one line. Either close it there or move the argument to its own line.

Error: Invalid single-argument block definition

  on terragrunt.hcl line 1, in terraform:

   1: terraform { source = "./mod"

   2: inputs = { a = }

An argument definition on the same line as its containing block creates a
single-line block definition, which must also be closed on the same line.

Steps

  1. Run terragrunt hcl validate.

Expected: it points at the exact line (better than guessing).

  1. Fix the block: either close it on the same line (terraform { source = "./mod" }) or put the argument on its own line inside a multi-line block.

Expected: braces balance.

  1. Run terragrunt hcl fmt --check --diff for formatting.

Expected: clean.

  1. Re-run your command.

Expected: the parse error is gone.

When this applies

  • Invalid single-argument block definition naming a block with an argument on the opening line.
  • Any HCL syntax error in terragrunt.hcl / root.hcl: the validator path is the same.

When it doesn't apply

  • The file parses but a VALUE is wrong (unknown attribute, type mismatch): those are evaluation errors; terragrunt render shows the resolved config.
  • ${...} inside a generate heredoc being eaten by Terragrunt: that's the generate-template trap (escape as $${...}), not a syntax error.

Tool versions

All Terragrunt versions (HCL syntax).

Why it happens

HCL has two block forms: single-line (block { arg = x }) and multi-line. An argument on the opening line selects the single-line form, so a missing closing brace on that line is a syntax error, not just bad style.

Edge cases

  • Two Terragrunt-specific traps that LOOK like generic HCL errors: values.* unbound outside a generated unit (validate the materialized unit after terragrunt stack generate, not the catalog source), and ${...} in generate heredocs evaluated by Terragrunt instead of passed through.

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+Invalid+single-argument+block+definition&type=skill'

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