Skip to content

Guides

Terraform Providers

Stout implements the Terraform Provider Registry Protocol with per-OS/arch download support. Providers are built from source for each target platform.

Configure Your Client

Reference providers from your Stout instance in your Terraform configuration:

terraform {
  required_providers {
    example = {
      source  = "registry.stout.io/myorg/example"
      version = "~> 1.2"
    }
  }
}

Install a Provider

terraform init

Terraform automatically downloads the correct binary for your OS and architecture.

Publish a Provider

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-provider",
    "repo": "https://github.com/myorg/terraform-provider-example",
    "version": "1.2.0"
  }'

Authentication

For private providers, configure credentials in ~/.terraformrc:

# ~/.terraformrc
credentials "registry.stout.io" {
  token = "your-stout-token"
}

Endpoints

Method Path Description
GET /terraform/providers/v1/:owner/:type/versions List provider versions
GET /terraform/providers/v1/:owner/:type/:version/download/:os/:arch Download provider binary
GET /.well-known/terraform.json Service discovery