Tfreg
Registry serving terraform providers from github releases
Install / Use
/learn @mattclement/TfregREADME
tfreg: Private Terraform Registry
tfreg is a terraform registry server that serves assets stored in github releases.

Features
- An opinionated implementation of the terraform provider registry. See required repo structure for more details.
- A Terraform Login server. This is required for use with private providers, as it uses the github oauth2 flow to use your permissions for downloading assets.
Installation
Check the github releases or clone the repo and run cargo build --release.
Setup
- Generate a new oauth app on GitHub.
- The
Authorization callback URLmust be alocalhostURL (e.g.http://localhost:10000/callback) since the terraform CLI runs an http server on localhost to receive the code from the redirect url. When the url is on localhost, the port may be changed bytfregto facilitate this specific workflow. See the github oauth2 docs for more information.
- The
- Generate a new client secret from your new oauth application.
- Run the app: see the configuration table below for how to set the necessary properties to run the app.
- There is no support for serving HTTPS traffic, so you must run some sort of TLS-capable proxy in front, since the terraform CLI will only talk over HTTPS.
- Test it:
curl localhost:8080/.well-known/terraform.json(or whatever host/port you're running on) should return a static json payload for the Terraform CLI to interpret.
Configuration
Configuration values are listed below. Required fields are shown in bold. CLI args and environment variables will override values set in an optionally provided TOML configuration file.
| Property | Example value | as CLI flag | as environment variable | as TOML property |
| ----------------------------- | ----------------- | ------------------ | ----------------------- | ---------------- |
| config file | config.toml | --config | TFREG_CONFIG | N/A |
| listen addr | 127.0.0.1:8080 | --addr | TFREG_ADDR | addr |
| rust log filter | tfreg=debug | --log-level | TFREG_LOG_LEVEL | log_level |
| stdout log format | pretty | --log-format | TFREG_LOG_FORMAT | log_format |
| OTLP trace collector URL | localhost:4317 | --otlp-endpoint | TFREG_OTLP_ENDPOINT | otlp_endpoint |
| OTLP trace collector headers | foo=bar,baz=qux | --otlp-headers | TFREG_OTLP_HEADERS | otlp_headers |
| cache directory | ./cache | --cache-dir | TFREG_CACHE_DIR | cache_dir |
| oauth2 client id | abcdef1234 | --client-id | TFREG_CLIENT_ID | client_id |
| oauth2 client secret | abcdef1234 | --client-secret | TFREG_CLIENT_SECRET | client_secret |
| secret key (32 bytes) | abcdef1234 | --secret-key | TFREG_SECRET_KEY | secret_key |
Note: the rust log filter variable follows the env logger syntax.
Required repo structure
A single version of a terraform provider corresponds to a github release.
The v0.3.1 tagged release of terraform-provider-cortex is possible to serve with tfreg as it follows the repo structure rules:
terraform-provider-cortex_0.3.1_darwin_amd64.zip
terraform-provider-cortex_0.3.1_darwin_arm64.zip
terraform-provider-cortex_0.3.1_freebsd_386.zip
terraform-provider-cortex_0.3.1_freebsd_amd64.zip
terraform-provider-cortex_0.3.1_freebsd_arm.zip
terraform-provider-cortex_0.3.1_freebsd_arm64.zip
terraform-provider-cortex_0.3.1_linux_386.zip
terraform-provider-cortex_0.3.1_linux_amd64.zip
terraform-provider-cortex_0.3.1_linux_arm.zip
terraform-provider-cortex_0.3.1_linux_arm64.zip
terraform-provider-cortex_0.3.1_SHA256SUMS
terraform-provider-cortex_0.3.1_SHA256SUMS.sig
terraform-provider-cortex_0.3.1_windows_386.zip
terraform-provider-cortex_0.3.1_windows_amd64.zip
terraform-provider-cortex_0.3.1_windows_arm.zip
terraform-provider-cortex_0.3.1_windows_arm64.zip
Repo structure rules
- Releases must be tagged as either
v1.2.3or1.2.3. - There may be a file named
SHA256SUMSor<binary_name>-<version>_SHA256SUMS. If a binary zip is not listed in this file, it will not be available for download. - All binary files must be named as above:
<binary_name>_<version>_<os>_<arch>.zip.versionmust not contain avprefix. - Zip files must contain only the binary which must be named the same as the archive, without the
.zipsuffix.
The GPG Key used to sign the sha256sums file is (currently) generated by tfreg on startup. It is not required to add a SHA256SUMS.sig file, as tfreg signs the SHA256SUMS file at request-time.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
