Infrastructure as code (IaC) is objectively the right call for managing infrastructure in complex systems, which is why many bigger companies rely on it. However, it also adds complexity to infrastructure management and has always been painful to work with, so it's much less common among hobby projects and startups.
There are two very interesting developments happening here with agents:
- Your agent can write, test and debug the config and fix whatever got out of sync, so IaC stops being a big burden to maintain and operate.
- The IaC config is great context for your agent: your architecture is right there in code, so it doesn't need a round of tool calls to figure out where things run.
That's why we're betting big on IaC: it will only grow in popularity and it's great for agents. Many teams run Neon next to services like AWS, Cloudflare or Sentry, and we want Neon to be first class in whichever IaC tool they pick: Alchemy, Pulumi, SST, Terraform or OpenTofu. On top of that, every Neon project ships with neon.ts, our own lightweight infrastructure-as-code file that gives your agent all your Neon definitions in one place.
Terraform is still the default and most widely used IaC tool, so that's where we're starting. Today, we're releasing an official Terraform provider for Neon: neondatabase/neon on the Terraform Registry, built in neondatabase/terraform-provider-neon. It's currently in beta and we aim to release v1 in the next 1-2 weeks!
In this post, I want to share where the provider comes from, what's new and how to move over from the community provider. I also asked Dmitry Kisler and Justin Frye, who co-wrote this post with me, a few questions along the way.
Where the provider comes from
The official provider started as a community project. In July 2022, Dmitry created kislerdm/terraform-provider-neon and shipped its first release, v0.0.1, on January 5, 2023. He built it on kislerdm/neon-sdk-go, a Go SDK he generates from the Neon API's OpenAPI spec. Since then, the provider has had 39 releases and almost two million downloads on the Terraform Registry. Most of them are recent: 1.78 million downloads came in the last 12 months alone (likely thanks to agents!).

Instead of starting over, we worked with Dmitry on porting his provider to neondatabase/neon and making it official. For this launch, we asked him a few questions.
Why did you start a Terraform provider for Neon?
I met Nikita [Shamgunov, Neon's co-founder] and a couple of Neon engineers at WeAreDevelopers in Berlin in 2022. Despite my initial skepticism, which I raised as the question "how are you going to compete with Aurora and AWS?", the guys' rationale and strong understanding of Postgres ins and outs made me a fan right there and then. I subscribed as a beta tester and looked forward to trying their product. The idea of separating storage from compute wasn't new, but Neon's delivery was spotless. The branching feature was simply mind blowing!
I obviously wanted to automate infra provisioning. At the time, there was no provider, nor a CLI available. I decided to solve that problem to ease my own life, but also to give back to the community. That's how I decided to develop a Neon Terraform provider. I made its first release back in January 2023 and maintained it with community support, which I'm deeply grateful for.
What does it mean to you that the provider is now official?
I find it a privilege when the project you built to solve your own particular problem is useful to others. It motivated me throughout the years when I steered the provider's development. At the same time, that work felt like a big responsibility, because users have certain expectations of the OSS they trust as a dependency. At times, it felt like a huge responsibility that unfortunately I could not keep up with due to my other commitments.
It felt amazing when you approached me and shared that the Databricks/Neon team picked my project as the basis for the official Terraform provider. I was over the moon and über grateful for such an honor! I look forward to our further collaboration, and I will invest as much of my available time as I can for the project to grow and gain more success.
Timeline
- 2022: Dmitry meets Nikita and Neon engineers at WeAreDevelopers in Berlin and signs up for the Neon beta.
- July 2022: Dmitry creates neon-sdk-go and terraform-provider-neon.
- January 2023: neon-sdk-go v0.1.0 (January 3) and the first provider release, v0.0.1 on the Terraform Registry (January 5).
- September 2026: kislerdm/neon v0.18.0, the last of 39 community releases.
- November 2026: the official
neondatabase/neonprovider ships its first beta, v0.19.0-beta.0, and we maintain it together with Dmitry and Justin. The current release is v0.19.0-beta.4.
What's new since kislerdm/neon 0.18
v0.18.0, released in September 2026, is the last community release of kislerdm/neon. We shipped a lot of new Neon primitives in the meantime, so we used the move to an official provider to catch up. Over the last few weeks, Dmitry and Justin migrated the provider to Terraform's Plugin Framework and added resources for the newer Neon primitives. We reviewed and tested everything against the live API, added the remaining resources and made sure existing state moves over without replacing anything.
The Plugin Framework is what HashiCorp recommends for new providers and it's what makes ephemeral resources possible.
Ephemeral resources keep credentials out of the state file. With kislerdm/neon, a role password or connection URI ended up in terraform.tfstate. Now you read it during the run and hand it straight to the place that needs it:
resource "neon_project" "app" {
name = "app"
}
ephemeral "neon_connection_uri" "app" {
project_id = neon_project.app.id
branch_id = neon_project.app.branch.id
endpoint_id = neon_project.app.primary_compute.id
database = neon_project.app.database_name
role = neon_project.app.database_user
}
resource "aws_ssm_parameter" "database_url" {
name = "/app/database-url"
type = "SecureString"
value_wo = ephemeral.neon_connection_uri.app.uri
value_wo_version = 1
}Ephemeral resources need Terraform 1.10 or OpenTofu 1.11 or later. The rest of the provider works with Terraform 1.5 and up.
Here are the resources we added since 0.18, grouped by Neon primitive:
- Neon Functions:
neon_function,neon_trigger - Object Storage:
neon_bucket,neon_bucket_object,neon_service_credential - Neon Auth:
neon_auth(including sign-in methods, the email provider and webhooks),neon_auth_trusted_domain,neon_auth_oauth_provider - Realtime:
neon_branch_realtimeand the ephemeralneon_branch_realtime_secret - Data API:
neon_data_api - Snapshots and custom branch domains:
neon_snapshot,neon_custom_branch_domain - Access and billing:
neon_project_member_role,neon_org_member_role,neon_org_spending_limit
Enabling Realtime on a branch, for example, is one resource:
resource "neon_branch_realtime" "this" {
project_id = neon_project.app.id
branch_id = neon_project.app.default_branch_id
allowed_origins = ["https://app.example.com"]
}Meet Justin
To get the provider over the line, we brought in Justin Frye, a platform engineer who had already been contributing to it. He also built pi-provider-neon-ai-gateway, an extension that lets you use the Neon AI Gateway from the pi coding agent, so we asked him about that too.
Why did you build pi-provider-neon-ai-gateway?
Selfishly, I wanted to use the gateway using my preferred coding agent. Initially, Dominik worked on a more official provider through the official pi repo, but hit some resistance. It was much easier to take the work he started and, instead, build an extension to allow pi users to tap into the Neon AI Gateway as a provider. For me, having access to the gateway gave me access to multiple models from different providers with minimal resistance. There are several other providers out there that can route you to different models, but they add a cost on top of that. Neon does not.
How is maintaining packages like this changing with AI?
With the use of agents, maintaining the extension has been relatively easy. With every new update to the gateway, I can have one of my agents grab the specs, implement new models and run tests against the gateway to ensure functionality. Iterating on new versions has been something I enjoy and it makes managing my subscriptions easier since I technically only need one!
Getting started
Create an API key in the Neon Console and export it as NEON_API_KEY. This config creates a Neon project and an Object Storage bucket on its default branch:
terraform {
required_providers {
neon = {
source = "neondatabase/neon"
version = "0.19.0-beta.4"
}
}
}
provider "neon" {}
resource "neon_project" "app" {
name = "app"
region_id = "aws-us-east-2"
}
resource "neon_bucket" "uploads" {
project_id = neon_project.app.id
branch_id = neon_project.app.branch.id
name = "uploads"
}
output "s3_endpoint" {
value = neon_bucket.uploads.s3_endpoint
}terraform init
terraform applyOpenTofu installs the same provider from the OpenTofu registry, so tofu init and tofu apply work too. Our Terraform docs cover API keys and common errors, and the Registry docs cover every resource.
Moving from kislerdm/neon
If you already manage Neon with kislerdm/neon 0.18, you keep your state and your databases. Change the provider source and pin the beta version, since Terraform only installs a beta release when version names it exactly:
terraform {
required_providers {
neon = {
source = "neondatabase/neon"
version = "0.19.0-beta.4"
}
}
}Then point the existing state at the new provider and review the plan:
terraform state replace-provider registry.terraform.io/kislerdm/neon registry.terraform.io/neondatabase/neon
terraform init -upgrade
terraform planA few attributes changed shape on the way to the Plugin Framework. Nested blocks like branch and primary_compute are nested attributes now and "yes"/"no" strings are booleans. The migration guide lists every change. After those edits, the plan should show no changes or only in-place updates. If it shows a resource being replaced, don't apply it; open an issue with the plan output instead.
Why we shipped a beta
We shipped the provider as a beta to get it into your hands early, and we're iterating on the feedback coming in. We're aiming for v1 within weeks. Until then, pin the exact version and check the changelog before you bump it. Issues and feature requests are always welcome in neondatabase/terraform-provider-neon.
A big thank you to Dmitry for building and maintaining the provider for over three years and to Justin for the work that made the official release possible. We're really excited to keep building it together.
Happy coding!












