A terraform
provider that allows managing resources of discue.io.
If you're new to provider development, a good place to start is the Extending Terraform docs.
- Clone the repository
- Enter the repository directory
- Install the dependenies using
go install
- Build the provider using the script
build.sh
./build.sh
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
Then, create a .terraformrc
file in your operating system user directory and paste the following
provider_installation {
dev_overrides {
"grafana/grafana" = "/path/to/your/terraform-provider-discue" # this path is the directory where the binary is built
}
# 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 {}
}
Set the following mandator environment variables
DISCUE_API_KEY
: The api key used to access the target organization
DISCUE_API_ENDPOINT
: The target endpoint e.g. http://localhost:3000, if the API is running locally
In order to run the full suite of Acceptance tests, run ./test.sh
.
To generate or update documentation, run ./generate-docs.sh
.
This provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.
To add a new dependency github.com/author/dependency
to your Terraform provider:
go get github.com/author/dependency
go mod tidy
Then commit the changes to go.mod
and go.sum
.