terraform/provider/RELEASING.md
This document describes the release process for the LiteLLM Terraform Provider.
Releases are automated via GitHub Actions when a version tag is pushed. The workflow builds the provider for multiple platforms, signs the artifacts with GPG, and publishes them to GitHub Releases.
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.
Before creating a release:
Update CHANGELOG.md
[Unreleased] section to a new version sectionExample:
## [0.1.2] - 2026-02-20
### Added
- New feature description
### Fixed
- Bug fix description
### Changed
- Changed behavior description
Verify tests pass
make test
Verify the build works locally
make build
Land the changes in BerriAI/litellm
Open a PR to BerriAI/litellm updating terraform/provider/CHANGELOG.md (and any source changes) and merge it. Note the merge commit SHA; the release workflow takes it as git_ref
The provider source lives at terraform/provider/ in BerriAI/litellm; BerriAI/terraform-provider-litellm is a thin release mirror. Do not commit or tag the mirror directly
BerriAI/project-releaser > Actions > Publish Terraform providergit_ref: full 40-char commit SHA from BerriAI/litellm to release fromprovider_version: the new version without the v prefix (e.g. 0.3.0)dry_run: optional; validates without pushingterraform/provider/ into the mirror repo, commits, and pushes tag v<provider_version>Release workflow (goreleaser), which is gated by the production-release environment approvalImportant:
v<MAJOR>.<MINOR>.<PATCH> (e.g., v0.1.2, v1.0.0)The workflow will:
go mod tidyAfter the workflow completes successfully:
Check the GitHub Release
Verify the signature (optional)
# Download the checksums and signature
wget https://github.com/BerriAI/terraform-provider-litellm/releases/download/v0.1.2/terraform-provider-litellm_0.1.2_SHA256SUMS
wget https://github.com/BerriAI/terraform-provider-litellm/releases/download/v0.1.2/terraform-provider-litellm_0.1.2_SHA256SUMS.sig
# Verify the signature
gpg --verify terraform-provider-litellm_0.1.2_SHA256SUMS.sig terraform-provider-litellm_0.1.2_SHA256SUMS
If this provider is published to the Terraform Registry:
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 workflow refuses to push because the tag already exists on the mirror
Solution: Tags are immutable by design. Re-run the workflow with a new patch version instead of deleting or moving an existing tag
This project follows Semantic Versioning:
For pre-1.0 releases: