This provider is distributed through the Terraform Registry
at platform9/pcd. Releases are cut by pushing a semver tag; the
release workflow builds every platform binary
with GoReleaser, signs the checksums with the org GPG
key, and publishes a GitHub Release. The registry ingests that release
automatically via its webhook.
The steps below are split into one-time setup (done once for the repo) and per-release (done for every version).
These are account/organisation actions that require repo-admin and a registry-connected GitHub account. They cannot be automated from CI and are not performed by any tooling in this repo — a human runs them once.
The registry verifies every release's SHA256SUMS signature against a public
key registered to the platform9 namespace. Generate a dedicated key (RSA 4096,
no expiry is fine for a service key):
gpg --full-generate-key # choose RSA/RSA, 4096 bits
gpg --list-secret-keys --keyid-format=long # note the key ID / fingerprintExport both halves:
# Public key — this is uploaded to the Terraform Registry (step 3).
gpg --armor --export "<KEY_ID>" > pcd-signing-key.pub.asc
# Private key — this becomes the GPG_PRIVATE_KEY GitHub secret (step 2).
gpg --armor --export-secret-keys "<KEY_ID>" > pcd-signing-key.priv.ascKeep the private key and its passphrase in the org secret manager. Do not
commit either file (both are covered by the .gitignore *.asc rule).
In Settings → Secrets and variables → Actions, add:
| Secret | Value |
|---|---|
GPG_PRIVATE_KEY |
contents of pcd-signing-key.priv.asc (the full ASCII-armored block) |
PASSPHRASE |
the passphrase for that key |
GITHUB_TOKEN is provided automatically by Actions — no need to add it.
- The repository must be public (registry requirement). If it is still private, change it in Settings → General → Danger Zone → Change visibility. Confirm with the code owners before doing this — it exposes the full history.
- Sign in to https://registry.terraform.io with a GitHub account that is a
member of the
platform9org. - Publish → Provider, authorize the registry GitHub app for the
platform9org, and selectterraform-provider-pcd. The registry naming convention (terraform-provider-<name>) yields the addressplatform9/pcd, matchingmain.go'sregistry.terraform.io/platform9/pcd. - Under Settings → GPG Keys for the namespace, paste the public key from
step 1 (
pcd-signing-key.pub.asc).
Once connected, the registry installs a webhook so future GitHub Releases are ingested automatically.
With GoReleaser installed locally:
goreleaser check # validates .goreleaser.yml
goreleaser release --snapshot --clean --skip=sign # dry-run a full build (no publish)The snapshot build drops artifacts in dist/; confirm it produces one zip per
goos/goarch plus a ..._SHA256SUMS file and the ..._manifest.json.
Move the accumulated notes under ## [Unreleased] in
CHANGELOG.md into a new ## [X.Y.Z] - <date> section and open
a PR. Merge it to main before tagging.
From an up-to-date main:
git checkout main && git pull --ff-only
git tag v0.1.0 # semver, MUST start with 'v'
git push origin v0.1.0Pushing the tag triggers the release workflow.
gh run watch # or: gh run list --workflow=release.ymlOn success there is a new GitHub Release for the tag containing:
terraform-provider-pcd_X.Y.Z_<os>_<arch>.zipfor every platformterraform-provider-pcd_X.Y.Z_SHA256SUMSand its.sigterraform-provider-pcd_X.Y.Z_manifest.json
The registry usually ingests within a few minutes. Confirm the new version appears at https://registry.terraform.io/providers/platform9/pcd, then smoke-test consumption:
terraform {
required_providers {
pcd = {
source = "platform9/pcd"
version = "X.Y.Z"
}
}
}terraform init # should download platform9/pcd X.Y.Z and verify its signatureFollow Semantic Versioning: patch for fixes, minor for
new (backward-compatible) resources/data sources, major for breaking schema or
behavior changes. Pre-1.0 (v0.y.z), breaking changes bump the minor.
- The GitHub Actions used here are pinned to major-version tags to match
test.yml. Pin to commit SHAs if the org's supply-chain policy requires it. - Only tags matching
v*release; branch pushes never publish. terraform-registry-manifest.jsondeclares Terraform protocol 6.0 (the provider is built onterraform-plugin-framework); it is bundled into every release by GoReleaser so the registry records the protocol version.