Skip to content

Latest commit

 

History

History
87 lines (56 loc) · 2.38 KB

README.md

File metadata and controls

87 lines (56 loc) · 2.38 KB

Unleash Terraform Provider

Overview

A Terraform provider to provision and manage Unleash admin resources - in early development. To find out more about Unleash, please visit getunleash.io/

Development Requirements

Building The Provider

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

Clone repository somewhere outside your $GOPATH:

$ git clone [email protected]:philips-labs/terraform-provider-unleash
$ cd terraform-provider-unleash
$ go build .

Copy the resulting binary to the appropriate plugin directory e.g. .terraform.d/plugins/darwin_amd64/terraform-provider-unleash

Acceptance tests

In order to run the full suite of Acceptance tests, run make testacc.

Note: Acceptance tests create real resources, so it requires access to a Unleash server.

You can run the Unleash server locally using Docker, run docker compose up -d

Then, run:

make testacc

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 the provider:

go get github.com/author/dependency
go mod tidy

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

Using the provider

Terraform 0.13+: To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init.

terraform {
  required_providers {
    unleash = {
      source = "philips-labs/unleash"
      version = ">= 0.1.1"
    }
  }
}

provider "unleash" {
  api_url    = "http://unleash.api-url.com/api"
  auth_token = "auth-token"
}

Documentation

To generate or update documentation, run go generate.

Issues

Before opening any issues, please make sure you are running the latest version of the provider and the unleash server, we try to keep up to date with the changes in the Unleash API. :)

LICENSE

License is MIT