Skip to content

panther-labs/terraform-provider-panther

Repository files navigation

This repo is under active development and is not recommended for production use

Panther Terraform Provider

Terraform provider for Panther resources

This template repository is built on the Terraform Plugin Framework. The template repository built on the Terraform Plugin SDK can be found at terraform-provider-scaffolding. See Which SDK Should I Use? in the Terraform documentation for additional information.

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

Usage

Use the examples directory as a guide for setting up the provider.

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: Acceptance tests create real resources and may cost money to run.

PANTHER_API_URL=<Panther GraphQL URL> \
PANTHER_API_TOKEN=<Panther GraphQL API Token> \
make testacc