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 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 test-api-server
that serves data read from test-data.json
This allows to:
- avoid the necessity of providing valid API credentials
- avoid creating resources on remote server
- make the test results more reliable
Running make test
will:
- Build and run test-api-server which emulates Kentik API v6 by returning static preconfigured responses
- Run tests (communication with
test-api-server
) - Shut down
test-api-server
For debugging use Delve debugger
make build
dlv exec ./terraform-provider-kentik-synthetics
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.