This is a light weight Terraform Registry, more like a proxy.
It currently only supports the v1.provider
endpoint and Terraform provider releases hosted on Github.
The registry dynamically generates the correct response based on assets found in
Github provider releases which conform to the Terraform asset conventions.
There is one additional file required which should be called signkey.asc
This file must contain the ASCII Armored PGP public key which was
used to sign the ..._SHA256SUMS.sig
signature file.
If you don't have a PGP key yet, you can generate one easily.
- host your own private Terraform provider registry
- easily release custom builds of providers e.g. releases from your own forks
Build a docker image and deploy it to your favorite hosting location
Endpoint | Description |
---|---|
/.well-known/terraform.json |
The service discovery endpoint used by terraform |
/v1/providers/:namespace/:type/* |
The versions and download action endpoints |
terraform {
required_providers {
cloudfoundry = {
source = "terraform-registry.us-east.philips-healthsuite.com/philips-forks/cloudfoundry"
version = "0.12.2-202008131826"
}
}
}
}
The above assumes a copy of the terraform-registry running at:
https://terraform-registry.us-east.philips-healthsuite.com
It references philips-forks/cloudfoundry
version 0.12.2-202008131826
which maps to the following Github repository and release:
Notice the signkey.asc
which is included in this release. You can use Goreleaser with this .goreleaser.yml template to create arbitrary releases of providers. The provider pointer also does not include the terraform-provider-
prefix.
If you want to use the registry against a GitHub Enterprise server, just specify additional environment variables.
GITHUB_ENTERPRISE_URL
would be a value likehttps://github.example.com
.GITHUB_ENTERPRISE_UPLOADS_URL
depends on your installation, it defaults to the base URL.
See go-github documentation for details on both URLs.
- Create token with
repo
scope here
If you are using GitHub SSO for your organization, press Enable SSO
button on your token and authorize it for this organization.
- Set token in
GITHUB_TOKEN
environment variable
- Only supports providers
License is MIT