Skip to content

skyscrapr/terraform-provider-openai

Repository files navigation

Skyscrapr Terraform Provider for OpenAI

Go Reference Go Report Card Github Actions Workflow GitHub release (latest by date) License

Requirements

  • Terraform >= v1.2.0
  • Go >= 1.21 (to build the provider plugin)

Installing the Provider

The provider is registered in the official terraform registry

This enables the provider to be auto-installed when you run terraform init as long as there is a valid provider definition in the terraform config. See Usage

You can also download the latest binary for your target platform from the releases tab.

Building the Provider

  • Clone the repo:

    $ mkdir -p terraform-provider-openai
    $ cd terraform-provider-openai
    $ git clone https://github.com/skyscrapr/terraform-provider-openai
  • Build the provider: (NOTE: the install directory will be set according to GOPATH environment variable)

    $ go install .

Usage

You can enable the provider in your terraform configuration by add the folowing:

terraform {
  required_providers {
    openai = {
      source = "skyscrapr/openai"
    }
  }
}

You will also need to set an environment variable OPENAI_API_KEY to your Open API Key.

Documentation

Documentation can be found on the Terraform Registry.

Examples

Please see the examples for example usage.

Support

If you want to support my work then

Buy Me A Coffee