Skip to main content

terragrunt-generator
terragrunt-generator

Generate documented terragrunt.hcl manifests from Terraform module variables.

CI Codecov License: MIT Python uv

terragrunt-generator generates terragrunt.hcl configuration files - with documented inputs - from the variables exposed by a Terraform module. Point it at a module (a git repository or a local directory), tell it where to look up values, and it emits a ready-to-edit Terragrunt manifest plus an optional YAML config skeleton.

Documentation

The project site is published from main to GitHub Pages: https://goabonga.github.io/terragrunt-generator/.

Requirements

  • Python 3.13+

Installation

pip install terragrunt-generator

Or run it without installing, using uv:

uvx terragrunt-generator --help

Usage

terragrunt-generator \
  -u https://github.com/terraform-google-modules/terraform-google-project-factory.git \
  -v v14.2.1 \
  -l 'project'

This reads the module's variable blocks and prints a terragrunt.hcl whose inputs are wired to a yamldecode-based config lookup:

# terraform-google-modules v14.2.1
# https://github.com/terraform-google-modules/terraform-google-project-factory/tree/v14.2.1/

include {
    path = find_in_parent_folders()
}

locals {
    source = "github.com/terraform-google-modules/terraform-google-project-factory.git?ref=v14.2.1"
    all = merge(
        yamldecode(file(find_in_parent_folders("config.yaml"))),
    )
}

terraform {
    source = lookup(local.all, "project", false) == false ? null : lookup(local.all.project, "enabled", false) == false ? null : local.source
}

inputs = merge({
    billing_account = lookup(local.all.project, "billing_account", "")
    name = lookup(local.all.project, "name", "")
    org_id = lookup(local.all.project, "org_id", "")
    activate_api_identities = lookup(local.all.project, "activate_api_identities", [])
    activate_apis = lookup(local.all.project, "activate_apis", ["compute.googleapis.com"])
})

See the usage guide for the full option reference and the per-environment YAML workflow.

Development

git clone https://github.com/goabonga/terragrunt-generator.git
cd terragrunt-generator
uv sync

# Quality gates (mirrored in CI).
uv run ruff check src tests
uv run ruff format --check src tests
uv run mypy src
uv run pyright
uv run pytest --cov=terragrunt_generator

# Install the pre-commit + commit-msg hooks.
uv run pre-commit install

Versioning and release

Releases are automated. Every push to main runs multicz bump --commit --tag --push - driven by Conventional Commits - then publishes to PyPI and deploys the docs.

# Preview the next release against the current branch.
multicz status

Contributing

See CONTRIBUTING.md for the workflow, the commit-message convention, and the test/lint expectations. By participating you agree to the Code of Conduct.

Security issues: please follow the disclosure process in SECURITY.md.

License

Distributed under the MIT License.

Metadata

Release files for terragrunt-generator 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terragrunt-generator 1.2.0
File Size Uploaded Provenance Actions
terragrunt_generator-1.2.0.tar.gz 32.5 kB With provenance Details for terragrunt_generator-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for terragrunt-generator 1.2.0
File Interpreter ABI Platform Actions
terragrunt_generator-1.2.0-py3-none-any.whl Python 3 none any Details for terragrunt_generator-1.2.0-py3-none-any.whl

Total release size: 46.7 kB

Release files / terragrunt_generator-1.2.0.tar.gz

Download URL terragrunt_generator-1.2.0.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
445f7d8a5066f386789f8f90b97f6e53a3154ff1064877465f163fb0837c0fd5
BLAKE2b-256 checksum
How to use checksums
eacbda891b8dfa5f8e43d77e6680bc2f2535387ba0babf99797e140aa733f3a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / terragrunt_generator-1.2.0-py3-none-any.whl

Download URL terragrunt_generator-1.2.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7950e1027a2db01bfa920308e82d6358fe07b4e31a316fe2870be8abbb46e0f4
BLAKE2b-256 checksum
How to use checksums
f871027cbda00ff0804b75ecb1d14c13944548ec4946f80422815d2072f9a8e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for terragrunt-generator 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for terragrunt_generator-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page