This document walks through the full process required to publish the Terraform provider bunkerity/bunkerweb to the public Terraform Registry and explains how the existing GitHub workflows automate most steps.
Replace every
X.Y.Zexample with the target semantic version (for example0.2.0).
- Registry namespace: the GitHub organisation (or user)
bunkeritymust be approved by HashiCorp. Follow the official guide: https://developer.hashicorp.com/terraform/registry/providers/publishing#publish-a-provider. Keep handy the SVG logo, repository URL, and contact email that the registry UI asks for. - GPG keys: generate a signing key and store it as GitHub secrets:
GPG_PRIVATE_KEYcontaining the ASCII-armored private key (base64 if needed)PASSPHRASEholding the key passphrase
- Repository permissions: the
Releaseworkflow triggers whenever a tag matchingv*is pushed. Make sure you can push to the repository and create tags. - Local tooling (optional but recommended for validation):
- Go >= 1.23
- Terraform CLI >= 1.13 (1.14 once ephemeral resources are GA)
goreleaserif you want to dry-run builds locally
- Sync the main branch
git checkout main git pull --ff-only origin main
- Regenerate docs and examples
make generate git status # should be clean - Run tests
go test ./... TF_ACC=1 go test ./internal/provider -count=1
- Acceptance tests require a reachable BunkerWeb API (for example http://127.0.0.1:8888) plus
BUNKERWEB_API_ENDPOINTandBUNKERWEB_API_TOKENif you use environment variables. - When ephemeral resources depend on a specific Terraform CLI version, run the suite with that version explicitly.
- Acceptance tests require a reachable BunkerWeb API (for example http://127.0.0.1:8888) plus
- Update release notes: refresh
CHANGELOG.md(and README badges if they reference the version). - Optional local release rehearsal:
goreleaser release --snapshot --skip-publish --clean
- Pick the new semantic version.
- Adjust version strings in documentation if required.
- Commit the release prep changes:
git commit -am "Prepare release vX.Y.Z" - Create and push the annotated tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z" git push origin main git push origin vX.Y.Z
The workflow .github/workflows/release.yml executes automatically after the tag push:
- Check out the repository (full history for tag awareness).
- Install Go using the version in
go.mod. - Import the GPG key via
crazy-max/ghaction-import-gpg. - Run
goreleaser release --clean, which builds and signs the provider according to.goreleaser.yml:- ZIP archives for each GOOS/GOARCH pair
- SHA256 checksum file plus detached signature
terraform-registry-manifest.json
- Upload the artifacts to the GitHub release associated with the tag.
Confirm in the Actions tab that the goreleaser job succeeded. The release page should contain:
terraform-provider-bunkerweb_vX.Y.Z_<os>_<arch>.zipterraform-provider-bunkerweb_vX.Y.Z_SHA256SUMSterraform-provider-bunkerweb_vX.Y.Z_SHA256SUMS.sigterraform-provider-bunkerweb_vX.Y.Z_manifest.json
- After the GitHub release completes, the Terraform Registry crawler will fetch the assets (allow 5–15 minutes).
- Visit https://registry.terraform.io/providers/bunkerity/bunkerweb/latest to confirm the new version appears.
- Smoke test with Terraform CLI:
Terraform should download the new provider version from the registry.
mkdir -p /tmp/tf-provider-test && cd /tmp/tf-provider-test cat <<'EOF' > main.tf terraform { required_providers { bunkerweb = { source = "bunkerity/bunkerweb" version = "= X.Y.Z" } } } provider "bunkerweb" {} EOF terraform init
test.yml: lint, doc generation, and acceptance tests across several Terraform versions. Update the matrix (matrix.terraform) to include the versions you officially support (for example 1.5, 1.6, 1.14 once ephemeral resources graduate).release.yml: builds signed release artifacts on everyv*tag.issue-comment-triage.ymlandlock.yml: automatic community maintenance.
- Add a pre-release test job inside
release.ymlthat re-runsgo test ./...andTF_ACC=1 ...using either the fake API or a containerized instance. - Keep the Terraform matrix in
test.ymlcurrent with the versions required to exercise ephemeral resources. - If you want automatic release notes, set
changelog.disable: falsein.goreleaser.ymlor supply a changelog template.
- Hotfix: repeat the entire workflow using a new tag
vX.Y.Z+1, ensuring the changelog highlights the fix. - Rollback: delete the GitHub release and coordinate with HashiCorp support if you must yank a published version from the registry.
- Refresh docs and run all tests (
make generate,go test,TF_ACC=1). - Update changelog and commit the release prep.
- Tag
vX.Y.Zand push branch + tag. - Let GitHub Actions run GoReleaser and upload signed artifacts.
- Verify the GitHub release and the Terraform Registry listing.
- Announce the release (changelog, README badges, etc.).
Following this procedure keeps every provider release reproducible, tested, and automatically distributed through the official Terraform Registry.