Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

IaCLineage

Explore Terraform declarations and trace their source references from a local checkout. IaCLineage provides a Python CLI and a self-contained HTML report with searchable declarations, field-level lineage, and source locations.

No Terraform execution, cloud credentials, server, or network access is required to analyze source or open a report. This checkout prepares 0.1.0b3 (beta).

IaCLineage: search a declaration and trace its dependencies

Installation

Requires Python 3.12 or newer. Install from PyPI:

pip install iaclineage
iaclineage --version

To upgrade an existing installation, run pip install --upgrade iaclineage. To explicitly select the latest beta, add --pre to the upgrade command. Cloning this repository is only needed for source development.

See the tester guide for TestPyPI installation and the platform guide for Windows, Linux, and macOS setup.

Quick start

Point the CLI at a Terraform root module. Replace these paths with directories on your machine; the output directory must already exist.

If the project uses registry or remote modules, download their source before running IaCLineage. Run this inside each Terraform project root:

cd /path/to/terraform
terraform get

terraform get requires Terraform and any credentials needed to download private modules. Keep the default .terraform/modules cache. If the required modules are already downloaded, this step is unnecessary. Projects using only local modules can skip it.

Then inspect the project:

iaclineage scan /path/to/terraform
iaclineage find /path/to/terraform aws_vpc.main
iaclineage report /path/to/terraform --format interactive-html --output /path/to/reports/lineage.html

Open lineage.html locally in Chrome or Edge. Select a declaration, choose a field, then trace Upstream, Downstream, or Both. References include the consuming field, target, resolution status, and source range. The report works offline and can be shared as a single file.

Local module calls are followed automatically, including relative paths outside the scanned directory. IaCLineage reads downloaded modules through .terraform/modules/modules.json; it never runs Terraform or downloads modules. Missing remote-module source produces IAC103 diagnostics and leaves references into those modules unresolved. The available local source can still be inspected.

Find declarations

find accepts a full IaCLineage address, a standard Terraform resource address, or a declaration's final name. Exact full addresses take precedence.

iaclineage find . aws_vpc.main
iaclineage find . resource.aws_vpc.main
iaclineage find . main
iaclineage find . provider.aws.west
iaclineage find . aws --format json
iaclineage find . aws_vpc.main --format json --output /path/to/results.json

Provider aliases have distinct addresses: provider.aws and provider.aws.west. Searching aws lists matching provider configurations. Explicit provider = aws.west bindings on resources, data sources, and imports link to the declared provider. Duplicate target addresses remain ambiguous.

Child-module addresses include the call path, such as module.network.resource.aws_vpc.main; module.network.aws_vpc.main also works with find. Scanning a directory with no root .tf files discovers independent projects beneath it, each with a prefix such as production::.

Text and JSON use the same search exit codes:

Result Exit code JSON shape
One match 0 { "query": "...", "match": { ... } }
Multiple matches 1 { "query": "...", "matches": [ ... ] }
No match 1 { "error": "no match", "query": "..." }

Multiple matches include every declaration and its location. Refine the query when possible. Progress and diagnostics go to stderr, leaving stdout suitable for JSON consumers. Use --color never before the command to disable color.

Reports

# Interactive explorer
iaclineage report . --format interactive-html --output /path/to/reports/lineage.html

# Static HTML summary (the default format)
iaclineage report . --output /path/to/reports/summary.html

# Structural JSON
iaclineage report . --format json --output /path/to/reports/lineage.json

Reports exclude raw source values by default. To inspect source in a trusted local interactive report, use --include-source-values:

# Static HTML summary with RAW source values
iaclineage report . --format interactive-html --include-source-values --output /path/to/reports/lineage-with-source.html

This option is available only with --format interactive-html. The resulting file can contain secrets, comments, and literal values; review it before sharing. Keep report files outside scanned repositories and followed modules.

The interactive report includes declaration and field search, project and kind filters, module input/output connections, conditional evidence, and a resizable lineage workspace. See the interactive report guide for controls and tracing behavior.

Analysis scope

  • Analyzes .tf source using a parser; does not read plan/state JSON or evaluate Terraform.
  • Resolves declarations and static references across local and installed modules.
  • Treats dynamic-block and comprehension iterators as local symbols. Built-ins such as terraform.workspace, path.module, each, and count do not create entity edges.
  • Keeps references in iterator collections and other external expressions. Iterator values themselves are not evaluated or expanded into infrastructure instances.
  • Reports missing module sources and parse recovery as diagnostics. Unresolved references remain visible; source resolution does not verify provider-computed values.
  • Does not resolve implicit provider inheritance or module providers mappings. Custom TF_DATA_DIR and remote state resolution are unsupported.

A missing source reference does not prove runtime independence. Tracing stops at expression and instance-selection boundaries. Installed module snapshots also do not prove cache freshness or version-constraint satisfaction.

Development

uv sync --locked --group dev
uv run --no-sync pytest
node --test tests/test_lineage_ui.cjs
npm ci --ignore-scripts
npm run test:browser

Node and Playwright are developer tools only. Browser setup and native-platform checks are documented in the platform guide. See CONTRIBUTING.md for contribution guidelines and CHANGELOG.md for release notes.

Report bugs through GitHub Issues with the installed version and a synthetic example. Report security issues privately as described in SECURITY.md.

Licensed under Apache License 2.0.

Metadata

Release files for iaclineage 0.1.0b3

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

Source distribution (sdist)

Source distribution for iaclineage 0.1.0b3
File Size Uploaded
iaclineage-0.1.0b3.tar.gz 123.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iaclineage 0.1.0b3
File Interpreter ABI Platform
iaclineage-0.1.0b3-py3-none-any.whl Python 3 none any Details

Total release size: 179.2 kB

Release files / iaclineage-0.1.0b3.tar.gz

Download URL iaclineage-0.1.0b3.tar.gz
Size 123.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8f549913e7c1a013843174188748900ccfab1f5d5487497c20223c593af6185b
BLAKE2b-256 checksum
How to use checksums
0ae79738b54d15c5c6d0f908ba53fb5b79cc7b07c55ffcc860373f04850af30b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release files / iaclineage-0.1.0b3-py3-none-any.whl

Download URL iaclineage-0.1.0b3-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7e9650d4c81d13ccb5e865e03a56718d16ff7998679407d8d0ad28c958ff432
BLAKE2b-256 checksum
How to use checksums
21d3d651926ea393f65227f5b1e1088ff3a516eb9095944448e610242108c3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log
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