Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

academia-edu/terraform-provider-librato

 
 

Repository files navigation

Librato Terraform Provider (v1)

Requirements

  • Terraform 0.12.x
  • Go 1.14 (to build the provider plugin)

Building The Provider

git clone [email protected]:heroku/terraform-provider-librato
cd terraform-provider-librato
make build

Using the provider

export $GOPATH=%{GOPATH:-$HOME/go/bin}
make build
cp $GOPATH/bin/terraform-provider-librato ~/.terraform.d/plugins

After recompiling the provider, you will need to re-run terraform init init any projects that use it.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.14+ is required).

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-librato
...

Running tests

Unit tests

$ make test

Acceptance tests

Acceptance tests send requests against the Librato API. Hit the Librato UI and create a token. The Email should be popiulated for you automatically and the token will be generated. You will want a Full Access token as you'll be creating (and tearing down) Librato resources.

export LIBRATO_EMAIL=<email>
export LIBRATO_TOKEN=<token>

make testacc

If you want to run a single acceptance test:

export LIBRATO_EMAIL=<email>
export LIBRATO_TOKEN=<token>

# example: TestAccLibratoAlert_Rename
RUN=TestAccLibratoAlert_Rename make testaccone
# or
make RUN=TestAccLibratoAlert_Rename testaccone

Packages

No packages published

Languages

  • Go 93.4%
  • Shell 2.6%
  • Makefile 2.2%
  • HTML 1.8%