Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 1.51 KB

CONTRIBUTING.md

File metadata and controls

62 lines (47 loc) · 1.51 KB

Contributing to Terraform - Algolia Provider

Prerequisites

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the command below:
$ make install
  1. Use the installed provider as following
terraform {
  required_providers {
    algolia = {
      source  = "k-yomo/algolia"
      version = "999.999.999"
    }
  }
}

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 -u github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Prerequisites above).

When you changed schema or examples directory, you need to regenerate documents. To generate or update documentation, run make generate.

Test

Set required env variables.

$ echo ALGOLIA_APP_ID={APP_ID} >> .env
$ echo ALGOLIA_API_KEY={API_KEY} >> .env
$ direnv allow

Run make testacc to run the full suite of Acceptance tests.

$ make testacc

Note: Acceptance tests create real resources, and might cost money to run.