Skip to content

weisshorn-cyd/terraform-provider-opencti

Repository files navigation

Terraform Provider OpenCTI

Requirements

Installation

terraform {
  required_providers {
    opencti = {
      source = "weisshorn-cyd/opencti"
      version = ">= 0.1.0"
    }
  }
}

Running the provider

  1. $ make install
  2. $ cd examples
  3. $ TF_VAR_opencti_token="$OPENCTI_ADMIN_TOKEN" terraform init --reconfigure
  4. $ TF_VAR_opencti_token="$OPENCTI_ADMIN_TOKEN" terraform plan
  5. $ TF_VAR_opencti_token="$OPENCTI_ADMIN_TOKEN" terraform apply

Using the provider

See the examples folder.

Developing the Provider

To run the provider in development mode, modify your .terraformrc as described here

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 often cost money to run.

make testacc