https://github.com/kislerdm/terraform-provider-neon
Terraform provider to manage Neon SaaS resources
https://github.com/kislerdm/terraform-provider-neon
go golang neon neondatabase terraform terraform-provider
Last synced: 7 months ago
JSON representation
Terraform provider to manage Neon SaaS resources
- Host: GitHub
- URL: https://github.com/kislerdm/terraform-provider-neon
- Owner: kislerdm
- License: mpl-2.0
- Created: 2022-07-23T21:36:28.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T05:33:46.000Z (7 months ago)
- Last Synced: 2025-04-09T20:00:44.514Z (7 months ago)
- Topics: go, golang, neon, neondatabase, terraform, terraform-provider
- Language: Go
- Homepage: https://registry.terraform.io/providers/kislerdm/neon/latest/docs
- Size: 725 KB
- Stars: 70
- Watchers: 4
- Forks: 16
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Terraform Provider Neon
-----
⭐ The project needs your support! Please leave a star and become a GitHub sponsor! ⭐
-----
-----
Terraform provider to manage the [Neon](https://neon.tech/) Postgres projects.
## Using the provider
```terraform
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
```terraform
provider "neon" {
api_key = ""
}
```
2. Environment variables:
- Api key specified as `NEON_API_KEY`
## Requirements
- [Terraform](https://www.terraform.io/downloads.html) >= 1.14.x
## Building The Provider
1. Clone the repository
2. Enter the repository directory
3. Build the provider using the Go `install` command:
```sh
make build
```
4. Run to install the provider to be used locally:
```sh
make install
```
## Updating the Provider
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](https://neon.tech/docs/reference/terraform#important-usage-notes) in the Neon documentation.
## Local development
### Requirements
- [Go](https://golang.org/doc/install) (find required version in [go.mod](go.mod))
- gnuMake / cMake
### Commands for local development
Run to see the full list of commands:
```commandline
make help
```
Run to compile the provider:
```commandline
make build
```
It will yield the binary `terraform-provider-neon_vdev`.
Run to install the provider locally:
```commandline
make install
```
It will yield the path to the built binary.
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.