Detailed user documentation for the provider can be found here.
Anybody who wants to contribute to development is welcome to provide pull requests. To work on the provider, install tools listed in requirements section.
Optional tools:
- golangci-lint: https://golangci-lint.run/usage/install/#local-installation
Development steps:
- Build the provider:
make build
- Build and install the provider locally:
make install
- Run tests:
make test
- Run acceptance tests:
make acceptance
- Run golangci-lint:
make lint
- Format the code:
make fmt
- Generate the documentation:
make docs
- Check if generated documentation is up-to-date:
make check-docs
- Check Go module consistency:
make check-go-mod
Tests run the provider against a testAPIServer
This allows to:
- avoid the necessity of providing valid API credentials
- avoid creating resources on remote server
- make the test results more reliable
Acceptance tests run the provider against production server. To run it locally, you need to set your login credentials as environment variables as below.
export KTAPI_AUTH_EMAIL=<Kentik API authentication email>
export KTAPI_AUTH_TOKEN=<Kentik API authentication token>
For debugging use Delve debugger
make build
dlv exec ./terraform-provider-kentik-cloudexport
r -debug
c
# attach with terraform following the just-printed out instruction in your terminal
Release process for the provider is based on Git repository tags that follow semantic versioning. Every tag with format v[0-9].[0-9].[0-9] will trigger automatic build of package and publish it in Terraform registry.
To release the provider:
- Make sure that all code that you want to release is in master branch.
- Navigate to repository releases page, click Draft a new release button and put tag version (in v[0-9].[0-9].[0-9] format), name and description.
- Go to GitHub Actions to observe the release job.