terraform/provider/RELEASING.md
This document describes the release process for the LiteLLM Terraform Provider.
The provider is released in lockstep with LiteLLM: every LiteLLM release (dev, rc and stable) publishes the provider at the LiteLLM version, built from the same commit as the proxy. There is no separate provider release to cut.
The flow, end to end:
BerriAI/project-releaser's release pipeline resolves the commit to release (main HEAD for dev; main HEAD or an operator-supplied SHA for rc/stable) and passes the release approval gateterraform/provider/ from that commit into BerriAI/terraform-provider-litellm, commits, and pushes the tag v<litellm version> (for example v1.99.0, v1.99.0-rc.1, v1.99.0-dev.1), alongside the terraform-aws-litellm / terraform-google-litellm module mirrors which get the same tagRelease workflow (goreleaser): multi-platform build, GPG-signed checksums, GitHub release. It runs unattended; project-releaser does not wait for it<litellm version>terraform/provider/ only exists from LiteLLM ~1.95, so a stable patch cut from an older line skips the provider and publishes only the modules.
The Terraform Registry requires all providers to be signed with a GPG key. This must be configured before the first release.
If you don't already have a GPG key for provider signing:
gpg --full-generate-key
Configuration:
# List your keys to get the key ID
gpg --list-secret-keys --keyid-format=long
# Example output:
# sec rsa4096/ABCD1234EFGH5678 2024-01-01 [SC]
# 1234567890ABCDEF1234567890ABCDEF12345678
# uid [ultimate] Your Name <[email protected]>
#
# The key ID is: ABCD1234EFGH5678
# The fingerprint is: 1234567890ABCDEF1234567890ABCDEF12345678
# Export the private key (ASCII-armored format)
gpg --armor --export-secret-keys ABCD1234EFGH5678
# Export the public key
gpg --armor --export ABCD1234EFGH5678
Add the following secrets to the repository at: Settings → Secrets and variables → Actions → New repository secret
| Secret Name | Description | Value |
|---|---|---|
GPG_PRIVATE_KEY | The GPG private key for signing releases | Full output from gpg --armor --export-secret-keys (including -----BEGIN PGP PRIVATE KEY BLOCK----- and -----END PGP PRIVATE KEY BLOCK-----) |
PASSPHRASE | The passphrase for the GPG key | Your GPG key passphrase (leave empty if no passphrase was set) |
Before publishing to the Terraform Registry:
gpg --armor --export)Note: The public key fingerprint must match the key used to sign the provider releases.
BerriAI/litellm. Open a PR against litellm_internal_staging with the source change and a CHANGELOG.md entry under [Unreleased]. CI runs gofmt, go vet, build, tests and the endpoint-drift audit. A change that breaks existing configurations or state must say so in the changelog: the version number cannot signal it any moreLocally, before opening the PR:
make test
make build
Dispatch Build and Publish Componentized Images + Chart in BerriAI/project-releaser by hand with only publish_terraform enabled and the git_ref / tag of the release to (re)publish. The run waits on project-releaser's release approval, then mirrors and tags exactly as the pipeline does.
The mirror is push-only: do not commit or tag BerriAI/terraform-provider-litellm directly. The publish refuses to overwrite an existing tag; a version that failed in goreleaser is recovered by re-running the mirror's Release workflow for that tag, not by re-tagging.
The mirror's .github/ directory (the Release workflow) is the one thing the rsync preserves, so a change to the goreleaser workflow is a direct PR on the mirror; a change to .goreleaser.yml itself lands here like any other source change.
Error: Input required and not supplied: gpg_private_key
Solution:
GPG_PRIVATE_KEY and PASSPHRASE secrets are configured in the repositoryError: gpg: signing failed: No secret key
Solution:
GPG_PRIVATE_KEY secret contains the complete private key blockgpg --list-keysError: Build errors during compilation
Solution:
make test and make build locally firstgo.mod and go.sum are up to dateError: The publish job refuses to push because the tag already exists on the mirror
Solution: Tags are immutable by design and the version is the LiteLLM version, so this means the provider was already mirrored for this release. If the registry is missing the version, re-run the mirror's Release workflow for the existing tag rather than re-tagging
The provider version is the LiteLLM version, verbatim: X.Y.Z for a stable release, X.Y.Z-rc.N for a release candidate and X.Y.Z-dev.N for a nightly. It says which proxy the provider shipped with and was audited against; it does not follow SemVer's break-signalling, so breaking changes are announced in CHANGELOG.md and the registry docs instead.
Versions 0.1.0 to 0.4.0 predate this and remain in the registry on their own line. A ~> 0.4 constraint never receives another release.