Contributing to go-tfe
September 21, 2026 ยท View on GitHub
Adding or Updating HCP Terraform v2 API
To add functionality to go-tfe/v2, edit the OpenAPI specification in the Terraform Platform code. The github.com/hashicorp/go-tfe/v2 package will be generated from the US production OpenAPI endpoint specification nightly and will include the new functionality.
v1.x Contributions
You may create a PR containing critical fixes or security using branch 1.x as a base, but please be aware that the functionality is NO LONGER TESTED BY CI and SHOULD NOT BE EXTENDED except for in uncommon situations as determined by @hashicorp/tf-core-cloud. Consider migrating callers to use the v2 module if new platform features are required.
go-tfe Core Contributions
Everything outside of the v2/api directory is maintained as the core go-tfe wrapper code and
handles the following features and functionality:
- Configuration
- Authentication and token host allow list
- Meta APIs like IPRanges and OpenAPI
- Decompression
- Automatic retries
- Error handling
- Streaming downloads by URL or path (undecoded bodies)
HashiCorp Employees: Internal Development
If you have the latest HCP platform code in an adjacent directory, you can use the make api_internal
task to copy the unpublished internal-beta specification and build the SDK from it. The results should
not be committed and pushed to this repo, but can serve as a local package to develop tools against.
make api_internal creates a pre-commit hook to prevent accidentally committing changes. You can
remove this hook using rm .git/hooks/pre-commit.