terrably
Distribution

Terraform Registry

Repository naming, GPG key registration, connecting to the Terraform Registry, and generating provider documentation.

Repository naming

Your GitHub repository must be named terraform-provider-{name} (all lowercase) –

github.com/acme/terraform-provider-mycloud

Generate and register a GPG key

The Terraform Registry verifies that release assets are signed. Generate a 4096-bit RSA key — ECC keys are not accepted.

# Generate the key
gpg --full-generate-key
# Choose: RSA and RSA, 4096 bits, does not expire

# Export the public key
gpg --armor --export your@email.com

Go to registry.terraform.io → Settings → GPG Keys and paste the public key block under the namespace that owns your provider.


Connect the registry

Publish from the registry UI

  1. Go to registry.terraform.io → Publish → Provider.
  2. Select your GitHub organisation and the terraform-provider-mycloud repository.
  3. The registry creates a webhook — future v* releases are indexed automatically.

Verify the published provider

main.tf
terraform {
  required_providers {
    mycloud = {
      source  = "acme/mycloud"
      version = "~> 1.0"
    }
  }
}
terraform init   # downloads and verifies the binary signature
terraform plan

Generating provider documentation

The Terraform Registry displays documentation from a docs/ directory in your repository. tfplugindocs generates it automatically from your provider's live schema.

tfplugindocs is a Go tool, but it works with any provider language — it launches your pre-built binary via terraform providers schema -json. No Go knowledge required.

Prerequisites

  • Provider binary built via terrably build.
  • tfplugindocs installed (download a binary from the releases page).
  • terraform CLI on your PATH.

Generate docs

# 1. Build the binary
pnpm run build

# 2. Export the provider schema via Terraform
#    (uses tf-workspace/.terraformrc dev_overrides to launch your binary)
cd tf-workspace
TF_CLI_CONFIG_FILE=.terraformrc terraform providers schema -json > ../providers-schema.json
cd ..

# 3. Generate the docs/ directory
tfplugindocs generate \
  --providers-schema ./providers-schema.json \
  --provider-name mycloud

# 4. Clean up
rm providers-schema.json

tfplugindocs writes docs/ with the layout the registry expects –

index.md

Commit the docs/ folder and include it in the release — the registry reads it directly from the tag.

Customising output

Place example files alongside your provider and tfplugindocs includes them automatically as code blocks –

For full template control, see the tfplugindocs template guide.

Last updated on

On this page