Self Hosted Terraform Registry backed by S3

tf-registry

Self Hosted Terraform Registry backed by S3

Usage

tf-registry Provides a simple http server that implements the Terraform Module Registry Protocol.

Terraform Registry Server

Usage: tf-registry [flags] 

Flags:
  -bucket string
    	aws s3 bucket name containing terraform modules
  -port string
    	port for HTTP server (default "3000")
  -prefix string
    	optional path prefix for modules in s3
  -profile string
    	aws named profile to assume (default "default")

Uploading Modules

tf-registry uses S3 as its backend storage, and at the moment it is read only, meaning that modules must be manually uploaded to s3 before they can be retrieved via tf-registry.

The path format must match the expected format: s3:///[optional_prefix]/////.tgz

Example upload script (run from local module path):

#!/bin/bash

BUCKET="tf-registry-storage"
MODULE_NAME=$(basename $PWD)
REGISTY_NAMESPACE="nalbury"
PROVIDER="aws"
VERSION="1.0.0"

TMP_DIR=$(mktemp -d)
tar -czf ${TMP_DIR}/${MODULE_NAME}.tgz .
aws s3 cp ${TMP_DIR}/${MODULE_NAME}.tgz \
  s3://${BUCKET_NAME}/${REGISTRY_NAMESPACE}/{MODULE_NAME}/${PROVIDER}/${VERSION}/${MODULE_NAME}.tgz
rm -rf ${TMP_DIR}

Using Modules from the Registry

Once the module has been uploaded, and the server is running, you can then reference a module using the standard registry source format:

module "eks_cluster" {
  source  = "tf-registry.mydomain.io/nalbury/my-aws-module/aws"
  version = "~> 1.0.0"
}

NOTE Terraform will only install modules if your registry is served over HTTPS. You can use ngrok for a local server if necessary.

TODO

Aside from any TODOs mentioned in the code, tf-registry should ideally have:

  • Build CI + Release Artficats + Container Image
  • Helm Chart for running tf-registry
  • Terraform Module for running tf-registry (hosted publicly)
  • Module upload support either via a custom client (wrap s3 api), or via the HTTP API directly
  • Authentication
  • Provider registry support
  • Additional backend storage providers (gcp, azure, local FS)
Owner
Nick Albury
I'm build, break, and fix things in the Cloud for Angi.com and Handy.com.
Nick Albury
Similar Resources

Terraform provider implementation for interacting with the Tailscale API.

Terraform Provider Tailscale This repository contains a Terraform provider implementation for interacting with the Tailscale API.

Oct 3, 2022

Terraform Provider for Satori

Terraform Provider for Satori

Terraform Provider for Satori First time setup: make init Run the following command to build the provider make build Generate/update documentation Do

Dec 15, 2022

Terraform CDK aws Provider

Terraform CDK aws Provider

Jul 29, 2022

An experimental OpenAPI - Terraform Provider generator that does not yet function

tfpgen An experimental OpenAPI - Terraform Provider generator that does not yet function. The goal is to allow developers to incrementally generate a

Feb 19, 2022

Terraform-in-Terraform: Execute Modules directly from the Terraform Registry

Terraform-In-Terraform Provider This provider allows running Terraform in Terraform. This might seem insane but there are some edge cases where it com

Dec 25, 2022

GoatCounter is an open source web analytics platform available as a hosted service or self-hosted app

GoatCounter is an open source web analytics platform available as a hosted service (free for non-commercial use) or self-hosted app. It aims to offer easy to use and meaningful privacy-friendly web analytics as an alternative to Google Analytics or Matomo.

Dec 29, 2022

A self-hosted golang application that listens for Terraform pull request events via webhooks.

A self-hosted golang application that listens for Terraform pull request events via webhooks.

Atlantis Terraform Pull Request Automation Resources What is Atlantis? What does it do? Why should you use it? Stargazers over time Resources How to g

Dec 9, 2021

registry-tools: Prints image digest from a registry

registry-tools: Prints image digest from a registry

Dec 23, 2021

A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and the registry.

dn42regsrv A REST API for the DN42 registry, written in Go, to provide a bridge between interactive applications and registry data. A public instance

Apr 21, 2022

πŸ€– Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry

πŸ€– Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) container registry

✨ Prune container images in a CLI way ✨ Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) Container Registry Getting Started | Des

Dec 15, 2022

Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.

Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a controlled manner.

TERRAFORM CONTROLLER Terraform Controller manages the life cycles of a terraform resource, allowing developers to self-serve dependencies in a control

Dec 15, 2022

Terraform-provider-e2e-network - Terraform Provider Scaffolding (Terraform Plugin SDK)

This template repository is built on the Terraform Plugin SDK. The template repository built on the Terraform Plugin Framework can be found at terraform-provider-scaffolding-framework.

Jan 19, 2022

Terraform-equinix-migration-tool - Tool to migrate code from Equinix Metal terraform provider to Equinix terraform provider

Equinix Terraform Provider Migration Tool This tool targets a terraform working

Feb 15, 2022

Private Terraform Provider Registry For Golang

private-reggie Private Terraform Provider Registry Test With curl $ curl http://localhost:8080/terraform/providers/v1/hashicorp/hashicups/versions ht

Dec 13, 2021

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.

Selenoid Selenoid is a powerful implementation of Selenium hub using Docker containers to launch browsers. Features One-command Installation Start bro

Jan 5, 2023

Git with a cup of tea, painless self-hosted git service

Git with a cup of tea, painless self-hosted git service

Gitea - Git with a cup of tea View the chinese version of this document Purpose The goal of this project is to make the easiest, fastest, and most pai

Jan 2, 2023

Git with a cup of tea, painless self-hosted git service

Git with a cup of tea, painless self-hosted git service

Gitea - Git with a cup of tea View the chinese version of this document Purpose The goal of this project is to make the easiest, fastest, and most pai

Jan 2, 2023

Embedded, self-hosted swagger-ui for go servers

swaggerui Embedded, self-hosted Swagger Ui for go servers This module provides swaggerui.Handler, which you can use to serve an embedded copy of Swagg

Dec 31, 2022
EggContractor is a self-hosted contract monitoring web app + CLI client for Egg

EggContractor is a self-hosted contract monitoring web app + CLI client for Egg, Inc.. It allows you to easily monitor all your contract progress, as well as peeking into prospective coops you may want to join.

Nov 23, 2022
Cloud torrent: a self-hosted remote torrent client, written in Go (golang)
Cloud torrent: a self-hosted remote torrent client, written in Go (golang)

Cloud torrent is a a self-hosted remote torrent client, written in Go (golang).

Dec 21, 2021
Qfy - Self-hosted implementation of Synthetics - Monitoring checks to validate your service availability

qfy Self-hosted implementation of Synthetics - Monitoring checks to validate you

Feb 23, 2022
A tool for creating hidden accounts using the registry.
A tool for creating hidden accounts using the registry.

CreateHiddenAccount εˆ›ε»Ίιšθ—θ΄¦ε· δΈ­ζ–‡ | EN Tool Introduction There are two common ways to create a hidden account. One is to add the $ sign directly after the

Dec 20, 2022
Token-list - The community maintained Solana token registry

Please note: This repository is being rebuilt to accept the new volume of token

Feb 2, 2022
Mrrobot - A simple greetings bot for Slack that uses events api and hosted on AWS Lambda

Mr. Robot a greeter bot for your slack community build_docker

Aug 21, 2022
A simple self-hostable Machine Translation service, powered by spaGO

A simple self-hostable Machine Translation service, powered by spaGO

Nov 9, 2022
Self-service account creation and credential reset for FreeIPA
Self-service account creation and credential reset for FreeIPA

Auri Auri stands for: Automated User Registration IPA Auri implements self service account creation and reset of credentials for FreeIPA Features Requ

Dec 21, 2022
Self-Reproducing Programs

Quines: Self-Reproducing Programs This is a repository containing different implementations of self-reproducing programs. It is not meant to be a show

Jan 31, 2022
lightweight, self-service AWS IAM management
lightweight, self-service AWS IAM management

Contents Overview Architecture Prerequisites Workflow What groups exist? Who do I ask for access? What groups am I in? How do I add group members? How

Jan 16, 2022