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
<!-- mcp-name: io.github.zloeber/terraform-ingest -->
A Terraform 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 and embeds them into a vector database for similarity searches. Includes an easy to use cli, API, or MCP server.
## Features
- 📥 **Multi-Repository Ingestion**: Process multiple Terraform repositories from a single YAML configuration
- 🔄 **Auto-Import**: Import repositories from GitHub organizations (GitLab, Bitbucket support coming soon)
- 🔍 **Comprehensive Analysis**: Extracts variables, outputs, providers, modules, and descriptions
- 🏷️ **Branch & Tag Support**: Analyzes both branches and git tags of your choosing
- 🔌 **Dual Interface**: Use as a CLI tool (Click) or as a REST API service (FastAPI)
- 🤖 **MCP Integration**: MCP service for AI agent access to ingested modules via STDIO, SSE, or Streamable-http
- 📊 **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](https://zloeber.github.io/terraform-ingest/)
Or, if you just want the TLDR on using this as an MCP server (along with some examples) check [this](./docs/mcp_use_examples.md) out.
An example project repo with a large list of custom modules for kicking the tires can be found [here](https://github.com/zloeber/terraform-ingest-example)
## Installation
This application can be run locally using uv or docker.
> **NOTE** `uv` is required for lazy-loading some large dependencies.
```bash
uv tool install terraform-ingest
# Create a config
uv run terraform-ingest init config.yaml
# Or import repositories from a GitHub organization
uv run terraform-ingest import github --org terraform-aws-modules --terraform-only
# 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.
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.16.tar.gz.
File metadata
- Download URL: terraform_ingest-0.1.16.tar.gz
- Upload date:
- Size: 361.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 |
7dabec2a07494f9ccd98903443fbf67a92f7fb7e3ea2d6a8ab58b47449ed75f2
|
|
| MD5 |
76515a7ce6c380dcb3ec7199e9223c2b
|
|
| BLAKE2b-256 |
c90b44149a013223e5d0b03c6e62e07cbb1f08e650108342858af8e618706d8f
|
Provenance
The following attestation bundles were made for terraform_ingest-0.1.16.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.16.tar.gz -
Subject digest:
7dabec2a07494f9ccd98903443fbf67a92f7fb7e3ea2d6a8ab58b47449ed75f2 - Sigstore transparency entry: 659504834
- Sigstore integration time:
-
Permalink:
zloeber/terraform-ingest@2319115e6b3207f5cc57c568e430d7fd1aee0b6d -
Branch / Tag:
refs/tags/0.1.16 - Owner: https://github.com/zloeber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@2319115e6b3207f5cc57c568e430d7fd1aee0b6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file terraform_ingest-0.1.16-py3-none-any.whl.
File metadata
- Download URL: terraform_ingest-0.1.16-py3-none-any.whl
- Upload date:
- Size: 65.3 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 |
d087a0e1ec03522be79704e3600a82f3e86692a6431399a7d48c09c36f2ab5b7
|
|
| MD5 |
3e7c4d19d67f2d4ad706c9a59213f2c2
|
|
| BLAKE2b-256 |
7107debe737fce21903472bff14652e763a5e5a387e5e5c06e1efc4591a55aa2
|
Provenance
The following attestation bundles were made for terraform_ingest-0.1.16-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.16-py3-none-any.whl -
Subject digest:
d087a0e1ec03522be79704e3600a82f3e86692a6431399a7d48c09c36f2ab5b7 - Sigstore transparency entry: 659504838
- Sigstore integration time:
-
Permalink:
zloeber/terraform-ingest@2319115e6b3207f5cc57c568e430d7fd1aee0b6d -
Branch / Tag:
refs/tags/0.1.16 - Owner: https://github.com/zloeber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@2319115e6b3207f5cc57c568e430d7fd1aee0b6d -
Trigger Event:
push
-
Statement type: