Skip to content

patientsknowbest/terraform-provider-aidbox

Repository files navigation

Terraform Provider Aidbox

Terraform provider for aidbox.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
$ go install

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.

Using the provider

See examples directory.

Developing the Provider

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

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

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

Note: you could run into this error during testing with some state stuck in Error: unexpected status code from RPC request 422 422 Unprocessable Entity [{"error":{"message":"Box mybox already exists"}}] Sometimes not even bringing up a new stack via compose helps, try running docker container prune for the containers created by docker-compose.

Acceptance tests require an aidbox server to run against.

You can start aidbox in docker with the provided docker-compose file.

Trial license can be obtained either

  • as per aidbox documentation
  • we can also issue our own development licenses from now on, ask around for these
$ (cd scripts && AIDBOX_LICENSE=<your-devbox-license> MB_LICENSE=<your-multibox-license> docker-compose up -d)
$ make testacc