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-mycloudGenerate 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.comGo 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
- Go to registry.terraform.io → Publish → Provider.
- Select your GitHub organisation and the
terraform-provider-mycloudrepository. - The registry creates a webhook — future
v*releases are indexed automatically.
Verify the published provider
terraform {
required_providers {
mycloud = {
source = "acme/mycloud"
version = "~> 1.0"
}
}
}terraform init # downloads and verifies the binary signature
terraform planGenerating 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. tfplugindocsinstalled (download a binary from the releases page).terraformCLI on yourPATH.
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.jsontfplugindocs writes docs/ with the layout the registry expects –
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
CI release workflow
Multi-platform GitHub Actions workflow that builds a native binary for each target platform, then packages and publishes a signed GitHub Release.
Schema migration
Increment schema version, implement upgrade() to migrate stored state, and common patterns for renaming, splitting, and removing attributes.