A terraform multi-repo module AI RAG ingestion engine that accepts a YAML file of terraform git repository sources, downloads them locally using existing credentials, creates JSON summaries of their purpose, inputs, outputs, and providers on the main and git tag branches for ingestion via a RAG pipeline into a vector database.
Project description
terraform-ingest
A terraform multi-repo module AI RAG ingestion engine that accepts a YAML file of terraform git repository sources, downloads them locally using existing credentials, creates JSON summaries of their purpose, inputs, outputs, and providers for branches or tagged releases you specify for ingestion via a RAG pipeline into a vector database. Includes an easy to use cli, API, or MCP server.
Features
- 📥 Multi-Repository Ingestion: Process multiple Terraform repositories from a single YAML configuration
- 🔍 Comprehensive Analysis: Extracts variables, outputs, providers, modules, and descriptions
- 🏷️ Branch & Tag Support: Analyzes both branches and git tags
- 🔌 Dual Interface: Use as a CLI tool (Click) or as a REST API service (FastAPI)
- 🤖 MCP Integration: FastMCP service for AI agent access to ingested modules
- 📊 JSON Output: Generates structured JSON summaries ready for RAG ingestion
- 🔐 Credential Support: Uses existing git credentials for private repositories
- 🧠 Vector Database Embeddings: Semantic search with ChromaDB, OpenAI, Claude, or sentence-transformers
Further documentation found here
Or, if you just want the goods on using this as an MCP server along with some examples check this out.
Installation
This application can be run locally as a CLI, API service, or MCP server using uv or docker.
# simple pip install (less preferred)
pip install terraform-ingest
## UV (preferred)
uv tool install terraform-ingest
# Create a config
uv run terraform-ingest init config.yaml
# Update your config.yaml file to include your terraform module information and mcp config then preform the initial ingestion
uv run terraform-ingest ingest config.yaml
# Run a quick cli search to test things out
uv run terraform-ingest search "vpc module for aws"
## Docker
docker pull ghcr.io/zloeber/terraform-ingest:latest
# Run with volume mount for persistence, ingest modules from local config.yaml file
docker run -v $(pwd)/repos:/app/repos -v $(pwd)/output:/app/output -v $(pwd)/config.yaml:/app/config.yaml ghcr.io/zloeber/terraform-ingest:latest ingest /app/config.yaml
# Run as MCP server
docker run -v $(pwd)/repos:/app/repos -v $(pwd)/output:/app/output -v $(pwd)/config.yaml:/app/config.yaml -p 8000:8000 ghcr.io/zloeber/terraform-ingest:latest mcp -c /app/config.yaml
# Search for modules and get the first result, show all details
terraform-ingest search "vpc module for aws" -l 1 -j | jq -r '.results[0].id' | xargs -I {} terraform-ingest index get {}
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Automatic Versioning and Release
This project uses Semantic Versioning with automatic releases triggered by commits to the main branch.
How it works:
- Commit your changes using Conventional Commits format
- Merge to
mainbranch (via Pull Request) - The semantic release workflow automatically:
- Analyzes commits since last tag
- Determines version bump (major/minor/patch)
- Creates and pushes a git tag
- Triggers PyPI publishing
- Creates GitHub release with changelog
Commit format examples:
feat: add new feature→ Minor version bumpfix: resolve bug→ Patch version bumpfeat!: breaking change→ Major version bump
See Commit Conventions Guide for detailed guidelines and Semantic Release Documentation for pipeline details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terraform_ingest-0.1.6.tar.gz.
File metadata
- Download URL: terraform_ingest-0.1.6.tar.gz
- Upload date:
- Size: 384.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f47ed5dd93b1b14cb86736ab5379c07010f58e944389c045db0cf4b15161cae
|
|
| MD5 |
c45abfe628238eb2a4c4293e4381c148
|
|
| BLAKE2b-256 |
82da1d0284b2e49b20cf092eb99ee06ad043775c5323481e7d615c005bf80143
|
Provenance
The following attestation bundles were made for terraform_ingest-0.1.6.tar.gz:
Publisher:
release.yaml on zloeber/terraform-ingest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terraform_ingest-0.1.6.tar.gz -
Subject digest:
7f47ed5dd93b1b14cb86736ab5379c07010f58e944389c045db0cf4b15161cae - Sigstore transparency entry: 652943753
- Sigstore integration time:
-
Permalink:
zloeber/terraform-ingest@c76f839a7ce29627c99de77722861b6e6c6edd7e -
Branch / Tag:
refs/tags/0.1.6 - Owner: https://github.com/zloeber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@c76f839a7ce29627c99de77722861b6e6c6edd7e -
Trigger Event:
push
-
Statement type:
File details
Details for the file terraform_ingest-0.1.6-py3-none-any.whl.
File metadata
- Download URL: terraform_ingest-0.1.6-py3-none-any.whl
- Upload date:
- Size: 53.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
820a11f16ef96ea102a3591cc966e4cac2056520a65f558952487a65883c7c2f
|
|
| MD5 |
de0e835e8efeff5ad9c18c9c9e3ecd0b
|
|
| BLAKE2b-256 |
e756c23edcb03eff719319fe88a798a1465dc6adac0ba51cf5415c9e8d3289c3
|
Provenance
The following attestation bundles were made for terraform_ingest-0.1.6-py3-none-any.whl:
Publisher:
release.yaml on zloeber/terraform-ingest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terraform_ingest-0.1.6-py3-none-any.whl -
Subject digest:
820a11f16ef96ea102a3591cc966e4cac2056520a65f558952487a65883c7c2f - Sigstore transparency entry: 652943756
- Sigstore integration time:
-
Permalink:
zloeber/terraform-ingest@c76f839a7ce29627c99de77722861b6e6c6edd7e -
Branch / Tag:
refs/tags/0.1.6 - Owner: https://github.com/zloeber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@c76f839a7ce29627c99de77722861b6e6c6edd7e -
Trigger Event:
push
-
Statement type: