This provider is used to configure certain resources supported by Split API.
For provider bugs/questions, please open an issue on this repository.
Documentation about resources and data sources can be found here.
provider "split" {
version = "~> 0.1.0"
# Use either api_key (default) for Bearer token authentication
api_key = "YOUR_API_KEY"
# OR use harness_token for x-api-key header authentication
# harness_token = "YOUR_HARNESS_TOKEN"
}This provider supports two authentication methods:
-
API Key Authentication (Default): Uses a Bearer token in the Authorization header.
- Set via the
api_keyparameter or theSPLIT_API_KEYenvironment variable.
- Set via the
-
Harness Token Authentication: Uses the
x-api-keyheader for authentication.- Set via the
harness_tokenparameter or theHARNESS_TOKENenvironment variable. - When this authentication method is used, the following resources are deprecated and cannot be used:
split_usersplit_groupsplit_workspacesplit_api_key(only whentype = "admin")
- Set via the
Provider binaries can be found here.
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.12+ is required).
If you wish to bump the provider version, you can do so in the file version/version.go.
To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.
$ make build
...
$ $GOPATH/bin/terraform-provider-split
...To use the dev provider with local Terraform, copy the freshly built plugin into Terraform's local plugins directory:
cp $GOPATH/bin/terraform-provider-split ~/.terraform.d/plugins/Set the split provider without a version constraint:
provider "split" {}Then, initialize Terraform:
terraform initPlease see the TESTING guide for detailed instructions on running tests.
This project uses Go Modules for dependency management.
This example will fetch a module at the release tag and record it in your project's go.mod and go.sum files.
It's a good idea to run go mod tidy afterward and then go mod vendor to copy the dependencies into a vendor/ directory.
If a module does not have release tags, then module@SHA can be used instead.