Skip to content

kislerdm/terraform-provider-neon

Repository files navigation

Terraform Provider Neon


⭐ The project needs your support! Please leave a star and become a GitHub sponsor! ⭐

💖 Thank you @neondatabase for sponsoring the project! 💖

Terraform provider to manage the Neon Postgres projects.

Using the provider

terraform {
    required_providers {
        neon = {
            source = "kislerdm/neon"
        }
    }
}

provider "neon" {}

Authentication and Configuration

Configuration for the Neon Provider can be derived from several sources, which are applied in the following order:

  1. Parameters in the provider configuration
provider "neon" {
  api_key = "<neon-api_key>"
}
  1. Environment variables:
  • Api key specified as NEON_API_KEY

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
make build
  1. Run to install the provider to be used locally:
make install

Local development

Requirements

  • Go (find required version in go.mod)
  • gnuMake / cMake

Commands for local development

Run to see the full list of commands:

make help

Run to compile the provider:

make build

It will yield the binary terraform-provider-neon_vdev.

Run to install a :

To generate or update documentation, run go docu.

In order to run the full suite of Unit tests, run make test.

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.