An unofficial Terraform provider for turbopuffer — the fast, serverless vector database built on object storage. Manage namespaces, attribute schemas, and pinning declaratively, with drift detection and import support.
resource "tpuf_namespace" "docs" {
name = "docs"
schema = {
text = {
type = "string"
full_text_search = true
}
embedding = {
type = "[1536]f32"
ann = true
}
source = {
type = "string"
filterable = true
}
}
pinning_replicas = 1
}- Documentation: provider, resources & data sources
- Sister project: Steampipe plugin for turbopuffer — query the same namespaces with SQL
| Name | Type | Description |
|---|---|---|
tpuf_namespace |
resource | Namespace lifecycle, attribute schema (filterable / full-text / glob / regex / ANN), pinning replicas |
tpuf_namespace |
data source | Read an existing namespace's schema and metadata |
tpuf_namespaces |
data source | List namespace names, optionally by prefix |
Document upserts and queries are data-plane operations that belong in application code — they are intentionally out of scope.
Signed release binaries for every OS/arch are published on the GitHub releases page. Each release includes a SHA256SUMS checksum file and a SHA256SUMS.sig GPG signature.
This provider is not currently on the Terraform Registry, so
terraform initwon't fetchsomoore/tpufautomatically. Install it from a release using one of the methods below. (If it is published later, therequired_providersblock in Quick start works as-is.)
Download the release assets, then verify the archive checksums, and — if you have the signing key — the signature:
VERSION=0.1.0
OS=$(uname -s | tr A-Z a-z)
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') # normalize to Terraform's arch names
ZIP="terraform-provider-tpuf_${VERSION}_${OS}_${ARCH}.zip"
BASE="https://github.com/somoore/terraform-provider-tpuf/releases/download/v${VERSION}"
# Grab the archive for your platform plus the checksum files.
curl -LO "${BASE}/${ZIP}"
curl -LO "${BASE}/terraform-provider-tpuf_${VERSION}_SHA256SUMS"
curl -LO "${BASE}/terraform-provider-tpuf_${VERSION}_SHA256SUMS.sig"
# Check the archive's SHA256 matches the published sum (prints "OK").
shasum -a 256 --ignore-missing -c "terraform-provider-tpuf_${VERSION}_SHA256SUMS"
# Optional: verify the checksum file itself is signed by the maintainer's key.
# Import the public key first (see releases page), then:
gpg --verify "terraform-provider-tpuf_${VERSION}_SHA256SUMS.sig" \
"terraform-provider-tpuf_${VERSION}_SHA256SUMS"On Linux, sha256sum -c --ignore-missing … is the equivalent of the shasum line.
Unzip the verified archive into a filesystem mirror laid out by the registry's expected path, then point Terraform at it:
# Layout: <mirror>/<hostname>/<namespace>/<type>/<version>/<os>_<arch>/
DEST=~/.terraform.d/plugins/registry.terraform.io/somoore/tpuf/${VERSION}/${OS}_${ARCH}
mkdir -p "$DEST"
unzip -o "$ZIP" -d "$DEST"# ~/.terraformrc
provider_installation {
filesystem_mirror {
path = "/Users/you/.terraform.d/plugins"
include = ["registry.terraform.io/somoore/tpuf"]
}
direct {} # everything else still resolves from the registry
}terraform init will now resolve somoore/tpuf from the local mirror. (For iterating on the provider source instead, use the dev override below.)
terraform {
required_providers {
tpuf = {
source = "somoore/tpuf"
version = "0.1.0"
}
}
}
provider "tpuf" {
# Or set TURBOPUFFER_API_KEY / TURBOPUFFER_REGION environment variables.
api_key = var.turbopuffer_api_key
region = "gcp-us-central1"
}Import existing namespaces by name:
terraform import tpuf_namespace.docs docsRequires Go 1.26+ and Terraform 1.0+.
git clone https://github.com/somoore/terraform-provider-tpuf.git
cd terraform-provider-tpuf
make hooks # activate pre-commit/pre-push checks (one time)
make build # build the provider binary
make test # gofmt + vet + security checks + all unit tests
make testacc # acceptance tests — needs TURBOPUFFER_API_KEY + TURBOPUFFER_REGION, creates real namespaces
make docs # regenerate docs/ from schema + examples/To run a local build, add a development override to ~/.terraformrc:
provider_installation {
dev_overrides {
"somoore/tpuf" = "/path/to/terraform-provider-tpuf"
}
direct {}
}turbopuffer name, logo, and wordmark are trademarks of turbopuffer Inc. This is an unofficial, community-maintained provider and is not affiliated with or endorsed by turbopuffer Inc.