Skip to content

discue/terraform-provider-discue

Repository files navigation

Vue logo


contributions - welcome GitHub License Go Report Card
Go Made with Node.js


terraform-provider-discue

A terraform provider that allows managing resources of discue.io.

Development

If you're new to provider development, a good place to start is the Extending Terraform docs.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Install the dependenies using go install
  4. Build the provider using the script build.sh
./build.sh

Running the provider

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 {}
}

Configuring the provider

Set the following mandator environment variables

Required

  • DISCUE_API_KEY: The api key used to access the target organization

Optional

Testing the provider

In order to run the full suite of Acceptance tests, run ./test.sh.

Generating documentation

To generate or update documentation, run ./generate-docs.sh.

Adding Dependencies

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.