Skip to content

feat!: add terraform provider support#10

Merged
jorrite merged 6 commits into
mainfrom
feat-add-provider-support
Apr 9, 2026
Merged

feat!: add terraform provider support#10
jorrite merged 6 commits into
mainfrom
feat-add-provider-support

Conversation

@jorrite
Copy link
Copy Markdown
Contributor

@jorrite jorrite commented Apr 8, 2026

🛠️ Summary

Adds reusable GitHub Actions workflows for Terraform provider repositories alongside the existing module workflows, and aligns the naming convention across both.

Changes:

  • Rename ci.yamlmodule-ci.yaml for consistent naming
  • Add module-release.yaml wrapping release-please for module releases
  • Add provider-ci.yaml with Go build (CGO_ENABLED=0), test, vet, lint (golangci-lint), goreleaser config validation, and Terraform Registry prerequisite checks (manifest, repo naming)
  • Add provider-release.yaml combining release-please for versioning with GoReleaser for cross-platform binary builds and GPG-signed releases
  • Inline the googleapis/release-please-action step directly in release.yaml, module-release.yaml, and provider-release.yaml — reusable workflow chaining is not possible since the caller repo cannot resolve relative paths back to this repo
  • Add examples/ directory with reference caller workflows (pinned to a release version + SHA), .goreleaser.yml, and release-please configs for both modules and providers
  • Rewrite README.md documenting both module and provider workflows with setup instructions

🚀 Motivation

We currently only support CI/CD for Terraform modules. Terraform providers have fundamentally different needs: they are Go binaries that must be cross-compiled, GPG-signed, and published with specific artifacts (SHA256SUMS, terraform-registry-manifest.json) for the Terraform Registry to ingest them. By adding provider workflows we can standardize the CI and release process for providers the same way we already do for modules.

The naming was also aligned to a {type}-ci.yaml / {type}-release.yaml pattern so the workflow structure is consistent and predictable.

📝 Additional Information

  • The provider release workflow runs release-please and GoReleaser in a single workflow: release-please creates the GitHub Release on push to main, and if a release was created (releases_created == true), GoReleaser runs immediately after to build binaries and append them to the release (release.mode: append). This avoids the need for a PAT or separate tag-triggered workflow.
  • The provider CI validates Terraform Registry prerequisites during PR checks: repository naming (terraform-provider-*), presence and validity of terraform-registry-manifest.json, valid .goreleaser.yml, and that release.mode is set to append (required to coexist with release-please).
  • Refer to the HashiCorp provider publishing docs for full registry requirements including GPG key setup.
  • The module-ci.yaml rename is a breaking change for existing consumers — they need to update their caller workflows from ci.yaml to module-ci.yaml.

@jorrite jorrite requested a review from a team as a code owner April 8, 2026 13:09
jorrite added 4 commits April 8, 2026 15:11
- Rename ci.yaml to module-ci.yaml for consistent naming
- Add module-release.yaml wrapping release-please for modules
- Add provider-ci.yaml with Go build, test, vet, lint, and registry
  prerequisite validation (manifest, repo naming, goreleaser config)
- Add provider-release.yaml combining release-please with goreleaser
  for cross-platform binary builds and GPG-signed releases
- Add examples/ with reference caller workflows, goreleaser config,
  and release-please configs for both modules and providers
- Rewrite README.md documenting both module and provider workflows
Move the release-please action into a single release-please.yaml
workflow and have release.yaml, module-release.yaml, and
provider-release.yaml call it instead of duplicating the action.
Ensures every provider repository has release.mode set to 'append'
in .goreleaser.yml, which is required to coexist with release-please.
Instead of requiring a PAT and separate tag-triggered workflow,
goreleaser now runs in the same workflow after release-please,
triggered by releases_created output. This simplifies consumer
setup and removes the GITHUB_TOKEN trigger limitation.
@jorrite jorrite force-pushed the feat-add-provider-support branch from 540b66e to 7ef4723 Compare April 8, 2026 13:11
jorrite added 2 commits April 8, 2026 15:41
…s github actions do not support relative files in templates to compose workflows
@jorrite jorrite merged commit 28cab53 into main Apr 9, 2026
1 check passed
@jorrite jorrite deleted the feat-add-provider-support branch April 9, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants