- Terraform >= 1.0
- Go >= 1.23
- Ensure
go env GOBINis set- If not set add
export GOBIN=/Users/<user>/go/bin/to your bashrc
- If not set add
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand from the root of the project:
go install .- Add the following to your
$HOME/terraformrcfile
provider_installation {
dev_overrides {
"ibm/gdp-middleware-helper" = "/Users/<user>/go/bin"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
- Ensure you have goreleaser installed
- Test the build process locally:
goreleaser release --snapshot --clean
Note: This will build all the binaries and place them in the
distdirectory
- Create a git tag from the branch you wish to build:
git tag -a v0.0.1
- Push this tag to git:
git push origin v0.0.1
- Run goreleaser to build the binaries with this version:
goreleaser release --snapshot --clean