If you would like to contribute code to this project, fork the repository and send a pull request.
In this project, use go mod
as the package management tool and make sure your Go version is higher then Go 1.13
.
Before contributing, you need to fork terraform-provider-pulsar to your GitHub account.
$ git remote add tfpulsar https://github.com/streamnative/terraform-provider-pulsar.git
# sync with the remote master
$ git checkout master
$ git fetch tfpulsar
$ git rebase tfpulsar/master
$ git push origin master
# create a PR branch
$ git checkout -b your_branch
# do something
$ git add [your change files]
$ git commit -sm "xxx"
$ git push origin your_branch
The terraform-provider-pulsar
uses go mod
to manage dependencies, so make sure your IDE enables Go Modules(vgo)
.
To configure annotation processing in GoLand, follow the steps below.
-
To open the Go Modules Settings window, in GoLand, click Preferences > Go > Go Modules(vgo).
-
Select the Enable Go Modules(vgo) integration checkbox.
-
Click Apply and OK.
We use Go Community Style Guide in terraform-provider-pulsar
.
For more information, see Go Code Review Comments.
Also please refer to Terraform Community Guidelines
Always use gofmt and linter (linter config is provided), before submitting any code changes.
To make your pull request easy to review, maintain and develop, follow this style.
To make sure that the changes/features/bug-fixes submitted by you does not break anything, always include test scripts for your work. If you're implementing a feature/pulsar entity, please submit an Acceptance Test as well. You can learn more about Terraform Acceptance Tests here
The project uses the open source protocol of Apache License 2.0. If you need to create a new file when developing new features, add the license at the beginning of each file. The location of the header file: header file.
The terraform-provider-pulsar
uses Go 1.13 module to manage dependencies.
To add or update a dependency, use the go mod edit
command to change the dependencies