Terraform Modules
Stout implements the Terraform Module Registry Protocol
with .well-known/terraform.json service discovery. terraform init works out of the box.
Configure Your Client
Reference modules from your Stout instance in your Terraform configuration:
module "vpc" {
source = "registry.stout.io/myorg/vpc/aws"
version = "1.2.0"
} Install a Module
terraform init Terraform discovers the registry endpoints automatically via /.well-known/terraform.json.
Publish a Module
Stout builds from source. Submit a build via the API:
curl -X POST https://registry.stout.io/api/v1/builds \
-H "Authorization: Bearer $STOUT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"format": "terraform-module",
"repo": "https://github.com/myorg/terraform-aws-vpc",
"version": "1.2.0"
}' Authentication
For private modules, configure credentials in ~/.terraformrc:
# ~/.terraformrc
credentials "registry.stout.io" {
token = "your-stout-token"
} Endpoints
| Method | Path | Description |
|---|---|---|
GET | /terraform/modules/v1/:owner/:name/:system/versions | List module versions |
GET | /terraform/modules/v1/:owner/:name/:system/:version/download | Download module |
GET | /.well-known/terraform.json | Service discovery |