This guide explains how to set up your environment, make changes, and submit a PR.
- Fork and clone the repo.
- Setup your preferred IDE (IntelliJ, VSCode, etc.)
Requirements:
- Terraform >= 1.0.0
- Go >= 1.25
- Node.js 24.x (for OpenSpec; installed via
make setup/npm ci) - Docker (for acceptance tests)
OpenSpec requirements specs live under openspec/specs/; see openspec-requirements.md. PR review automation (e.g. the verify-openspec label workflow) is documented in code-review.md.
- Create a new branch for your changes.
- Make your changes. See
development-workflow.mdfor the typical change loop and common make targets, and see Debugging for local runs. - Validate your changes
- Run unit and acceptance tests (see
testing.md). - Run
make lintto check linting and formatting. For this check to succeed, all changes must have been committed. - All checks also run automatically on every PR.
- Run unit and acceptance tests (see
- Submit your PR for review.
The ## [Unreleased] section of CHANGELOG.md is maintained automatically. The changelog-generation GitHub Actions workflow runs on a schedule and regenerates the ## [Unreleased] section from merged PR history. It opens a PR from the generated-changelog branch that is auto-merged once checks pass. You do not need to manually add changelog entries after your PR is merged.
When creating new resources:
- Use the Plugin Framework for new resources.
- Use an existing resource (e.g.
internal/elasticsearch/security/systemuser) as a template. - Some resources use the deprecated Terraform SDK, so only resources using the new Terraform Framework should be used as reference.
- Use an existing resource (e.g.
- Use the generated API clients to interact with the Kibana APIs (see
generated-clients.md). - Add documentation templates and examples for the resource (see
documentation.md). - Write unit and acceptance tests (see
testing.md).
You can run the currently checked-out code for local testing and use it with Terraform.
Also see Terraform docs on debugging.
Run the provider in debug mode and reattach the provider in Terraform:
- Launch
main.gowith the-debugflag from your IDE.- Or launch it with
go run main.go -debugfrom the command line.
- Or launch it with
- After launching, the provider will print an env var. Copy the printed
TF_REATTACH_PROVIDERS='{…}'value. - Export it in your shell where you run Terraform:
export TF_REATTACH_PROVIDERS='{…}'. - Terraform will now talk to your debug instance, and you can set breakpoints.
See development-workflow.md for common make targets and the typical change loop.
See testing.md for how to run acceptance tests (including required environment variables).
See generated-clients.md.
See documentation.md.
When you run make docs-generate, the command uses the Terraform CLI version pinned in the repository root .terraform-version file via tfplugindocs. If docs generation behavior changes because Terraform needs to be updated, update .terraform-version rather than relying on a locally installed Terraform version.
See repo-structure.md.
Releasing is implemented in CI pipeline. Release preparation is now automated — do not manually edit VERSION or CHANGELOG.md release sections.
To release a new provider version:
-
Dispatch the release preparation workflow using the
prep-releaseMakefile target:make prep-release # defaults to patch bump (e.g. 0.14.3 → 0.14.4) make prep-release BUMP=minor # minor bump (e.g. 0.14.3 → 0.15.0) make prep-release BUMP=major # major bump (e.g. 0.14.3 → 1.0.0)This dispatches the
prep-release.ymlGitHub Actions workflow, which:- Computes the target version by finding the latest semver release tag (
v*.*.*) onmainand applying the requested bump. - Creates (or reuses) a
prep-release-x.y.zbranch and opens a pull request with theVERSIONvariable inMakefileupdated to the target version.
- Computes the target version by finding the latest semver release tag (
-
Await the changelog update. The
changelog-generationworkflow automatically detects the newprep-release-*PR and regenerates the concrete## [x.y.z] - YYYY-MM-DDsection inCHANGELOG.md, pushing the result to theprep-release-*branch. -
Review and merge the release PR. Once the changelog section is populated and all checks pass, merge the
prep-release-x.y.zPR. -
Tag and release. After the PR is merged, start the release by pushing the version tag to
main:git tag v0.14.4 && git push origin v0.14.4The release CI pipeline will then build and publish the provider.