Terraform provider to manage the Neon Postgres projects.
terraform {
required_providers {
neon = {
source = "kislerdm/neon"
}
}
}
provider "neon" {}
Configuration for the Neon Provider can be derived from several sources, which are applied in the following order:
- Parameters in the provider configuration
provider "neon" {
api_key = "<neon-api_key>"
}
- Environment variables:
- Api key specified as
NEON_API_KEY
- Terraform >= 0.13.x
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
install
command:
make build
- Run to install the provider to be used locally:
make install
When updating your provider version, avoid using terraform init -upgrade
in CI pipelines and auto-approved pull requests, as this can lead to unintended resource replacements and data loss. Instead, use terraform init
in your automated workflows. Running terraform init -upgrade
should always be done manually, followed by plan reviews. For additional guidance, see Important usage notes in the Neon documentation.
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.