Neon
Neon is a serverless PostgreSQL platform that provides instant branching, autoscaling, and a generous free tier.Resources
NeonProject
Creates a Neon serverless PostgreSQL project.Props
string
default:"${app}-${stage}-${id}"
Name of the project
NeonRegion
default:"aws-us-east-1"
Region where the project will be provisioned. Available regions:
aws-us-east-1aws-us-east-2aws-us-west-2aws-eu-central-1aws-eu-west-2aws-ap-southeast-1aws-ap-southeast-2aws-sa-east-1azure-eastus2azure-westus3azure-gwc
number
default:"16"
PostgreSQL version to use. Supported versions: 14, 15, 16, 17, 18
string
default:"main"
Default branch name
boolean
When
true, will adopt an existing project by nameboolean
default:"true"
Whether to delete the database when the resource is destroyed. When false, the database will only be removed from the state but not deleted via API.
number
default:"86400"
History retention seconds for the project
ProjectSettingsData
Settings for the project
DefaultEndpointSettings
Default endpoint settings for the project
Returns
string
The ID of the project
string
Name of the Project
string
Time at which the project was created
string
Time at which the project was last updated
string
Hostname for proxy access
NeonRegion
Region where the project is provisioned
number
PostgreSQL version used by the project
NeonConnectionUri[]
Connection URIs for the databases
NeonRole[]
Database roles created with the project
Database[]
Databases created with the project
Branch
Default branch information
Endpoint[]
Compute endpoints for the project
NeonBranch
Creates a branch in a Neon project.Props
string | NeonProject
required
The project to create the new branch in. This can be a Project object or an ID string.
string
default:"${app}-${stage}-${id}"
The name of the branch
boolean
default:"false"
Whether the branch is protected
string | NeonBranch | Branch
The parent branch to create the new branch from. Default is the project’s default branch. This can be a Branch object or an ID string beginning with
br-.string
A Log Sequence Number (LSN) on the parent branch. The branch will be created with data from this LSN.
string
A timestamp identifying a point in time on the parent branch. The branch will be created with data starting from this point in time. The timestamp must be provided in ISO 8601 format; for example:
2024-02-26T12:00:00Z.boolean
When
true, will adopt an existing branch by namestring
The timestamp when the branch is scheduled to expire and be automatically deleted. Must be set following the RFC 3339, section 5.6 format with precision up to seconds (such as 2025-06-09T18:02:16Z).
'schema-only' | 'parent-data'
default:"parent-data"
The source of initialization for the branch:
schema-only- creates a new root branch containing only the schemaparent-data- creates the branch with both schema and data from the parent
BranchCreateRequestEndpointOptions[]
required
The endpoints to create for the branch. If you do not configure endpoints, you will not be able to connect to the branch.
Returns
string
The branch ID. This value is generated when a branch is created. A branch_id value has a br- prefix.
string
The ID of the project to which the branch belongs
string
The name of the branch
boolean
Whether the branch is protected
boolean
Whether the branch is the default branch
Date
The timestamp when the branch was created
Date
The timestamp when the branch was last updated
Endpoint[]
The endpoints for the branch
Database[]
The databases for the branch
NeonRole[]
The roles for the branch
NeonConnectionUri[]
The connection URIs for the branch