Terragrunt scaffold and catalog for standardized module onboarding
terragrunt scaffold generates a terragrunt.hcl boilerplate for a given module source by inspecting its variables and rendering them as inputs with documentation comments. The command fetches the module, parses variables.tf, and emits a starting config that you then customize per environment. The companion concept, the Terragrunt catalog, is a directory of scaffolded modules served over HTTP so developers can browse and instantiate them with a single command, producing a consistent structure without hand-writing HCL.
Platform teams use scaffold to enforce conventions: every new service gets the same backend block, the same provider pinning, and the same tagging strategy because the scaffold template encodes them. The catalog turns this into self-service, where a product engineer runs one command to get a compliant module skeleton. In large orgs this cuts onboarding from days to minutes and eliminates the drift that comes from copy-pasting an old module.
Security considerations: scaffold fetches remote module source, so run it only against trusted registries and verify the source URL. The generated file may include placeholder values that look real, such as account IDs from the upstream module's examples, so always review before committing. Performance is dominated by the network fetch, which is a few seconds for a small module. Common pitfalls include scaffold overwriting an existing terragrunt.hcl without warning, and the generated inputs referencing variables that do not exist in your fork of the module. Always diff the output against the module's actual interface before applying.
> System.Execute()
terragrunt scaffold github.com/acme/tf-modules//modules/rds?ref=v2.1.0 \
--terragrunt-working-dir envs/prod/rds \
--var database_name=payments \
--var instance_class=db.r6g.large
# Then review and commit:
git diff envs/prod/rds/terragrunt.hcl
> Architecture & Security Context
Verified for Valters IT Hub. When deploying this configuration in a production homelab or enterprise environment, ensure that you monitor system resources and implement strict access controls. Administrator privileges are required.
ID: VALTERSIT-2FD6D380C947