| Crates.io | tf-registry |
| lib.rs | tf-registry |
| version | 0.1.0 |
| created_at | 2026-01-12 20:04:37.237166+00 |
| updated_at | 2026-01-12 21:41:41.806635+00 |
| description | A high-performance, asynchronous implementation of the Terraform Provider Registry protocol, powered by Tokio and Axum. |
| homepage | https://github.com/iacabezasbaculima/tf-registry |
| repository | https://github.com/iacabezasbaculima/tf-registry.git |
| max_upload_size | |
| id | 2038744 |
| size | 173,893 |
A high-performance, asynchronous implementation of the Terraform Provider Registry protocol. Built with Tokio and Axum, it allows you to serve private Terraform providers natively using GitHub Releases as a storage backend.
terraform init workflow. No more network or file mirror hacks or manual binary injections.tf-registry?Modern infrastructure teams often outgrow public registries but face significant hurdles when managing private providers. This crate exists to provide a middle ground between "expensive enterprise platforms" and "manual hackery."
Enterprise solutions like Terraform Cloud or Harness IaC Management charge significant premiums for private registry functionality. tf-registry allows teams to self-host a private registry as a lightweight container (ECS/Kubernetes) or a serverless function (Lambda/Cloud Run), drastically reducing licensing overhead.
Without a registry, teams are often forced to manually inject provider binaries into CI/CD runners or use filesystem_mirror configurations.
terraform init workflow. Your providers are discovered and installed automatically, just like official HashiCorp providers.By leveraging GitHub Releases as a backend, this registry eliminates the need for a separate storage layer. It dynamically maps Terraform's protocol requests to your GitHub-hosted assets, providing a seamless bridge between your provider's source code and its consumption.
Built with Tokio and Axum, this registry is designed to handle high-concurrency environments (like massive parallel CI/CD jobs) with minimal memory footprint, making it ideal for cost-effective serverless deployment.
octocrab for efficient asset discovery and fetching.[dependencies]
tf-registry = "0.1"
tokio = { version = "1.0", features = ["full"] }
use tf_registry::Registry;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let token = std::env::var("GITHUB_TOKEN")?;
let gpg_key_id = std::env::var("GPG_KEY_ID")?;
let gpg_public_key_base64 = std::env::var("GPG_PUBLIC_KEY_BASE64")?;
// 1. Configure the Registry
let registry = Registry::builder()
.github_token(token)
.gpg_signing_key(
gpg_key_id,
tf_registry::EncodingKey::Base64(gpg_public_key_base64),
)
.build()
.await?;
// 2. Create the Axum Router
let app = registry.create_router();
// 3. Run it
let listener = tokio::net::TcpListener::bind("0.0.0.0:9000").await?;
println!("Registry listening on: {}", listener.local_addr()?);
axum::serve(listener, app).await?;
Ok(())
}
registry.example.com/my-org/my-provider).tf-registry queries the GitHub API to find matching releases and assets (zip files and SHA sums).tf-registry returns the signed metadata, pointing Terraform to the GitHub download URL.This project is licensed under the MIT license.