All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added the "User-Agent" header injected to every request to the Neon API for tracking purposes as agreed with James Broadhead from Neon.
- Added the resource
neon_api_key
to manage Neon API keys.
- [#119] Fixed the output attribute
host
of the resourceneon_endpoint
: it will yield the correct URI for the endpoints with the pooled mode activated. - Documentation improvements:
- Removed unclear warning from the page for the
neon_endpoint
resource.
- Removed unclear warning from the page for the
- Removed the outdated warning which was showing upon creation of the endpoint of the type "read_only",
- Updated dependencies:
- Neon Go SDK: v0.9.0
- [BREAKING] #113] Set the default retention window to 1 day to avoid inconsistency with Neon.
- Fixed docu; non-functional change.
- Added the attribute
protected
for the resourceneon_branch
to provision protected branches.
- [#108] Fixed the import behaviour for the resource
neon_role
. - Fixed mutability of the default branch by adjusting the behaviour for the
branch
state of the resourceneon_project
.
- Updated dependencies:
- Neon Go SDK: v0.6.1
- Added support of Postgres 17. See the Neon announcement and the Postgres announcement.
- Fixed validation of the autoscalling limits. You can now set the maximum compute size up to
10
.
- [#99] Added the attribute
org_id
to the resourceneon_project
to create project in the organisation.
- [BREAKING] [#96] The boolean attributes of the
resource
neon_project
will be treated as strings to work around the issue with state management when the attribute gets removed from the manifest.
Examples
- Set allowed_ips to be applicable only to the primary branch:
resource "neon_project" "this" { name = "myproject" allowed_ips = ["1.2.3.4/24"] allowed_ips_primary_branch_only = "yes" }
- Set allowed_ips to be applicable to all branches, explicitly:
resource "neon_project" "this" { name = "myproject" allowed_ips = ["1.2.3.4/24"] allowed_ips_primary_branch_only = "no" }
- Set allowed_ips to be applicable to all branches, implicitly:
resource "neon_project" "this" { name = "myproject" allowed_ips = ["1.2.3.4/24"] }
- Updated dependencies:
-
[#22] Added the following data resources:
neon_project
neon_branches
neon_branch_endpoints
neon_branch_roles
neon_branch_role_password
-
Added the read-only attribute
default_endpoint_id
to the resourceneon_project
. -
Added the retry logic to manage all supported resources:
neon_project
neon_branch
neon_endpoint
neon_role
neon_database
neon_project_permission
- [#83] Fixed the state management of the project's default branch, role, database and endpoint.
- [#88] Fixed import of the resource
neon_role
.
- Updated dependencies:
- Neon Go SDK v0.4.7
- Reduced the retry delay to 1 second from 5 seconds.
- Added the resource
neon_project_permission
to manage the project's permissions.
- [
resource_project>region_id
] Validation of the project deployment region was removed.
- Updated dependencies: Neon Go SDK v0.4.2
resource_project
includes the attributeenable_logical_replication
to configure the logical replication.
- PostgreSQL 16 is now supported.
- Updated dependencies: Neon Go SDK v0.4.1
resource_project
includes two additional attributes to configure IP addresses allowed to connect to the project's endpoints:allowed_ips
allowed_ips_primary_branch_only
- Schema is set on per resource basis now.
- Fixed validation of the branch ID.
- Minor documentation fixes:
- The note in the
resource_role
is removed because it's not reflecting the provider's behaviour. - The logo is fixed.
- The note in the
- Updated dependencies: Neon Go SDK v0.3.0
- [#51] Fixed credentials content.
- Fixed management of the
resource_role
state:- Fixed password reading.
- Removed the side effect upon the resource import: the role's password won't be reset now.
- Updated dependencies: Neon Go SDK v0.2.5
resource_project
:- (#40) Fixed types conversion for the terraform
resource attributes of the
type
TypeInt
. - (#42) Fixed default branch configuration.
- (#48) Fixed default endpoint settings configuration.
- Fixed history retention configuration. Now, the retention period of 7 days will be set by default, and zero will
be set if
history_retention_seconds
is set to zero explicitly.
- (#40) Fixed types conversion for the terraform
resource attributes of the
type
Note web console will reflect the data retention period correctly only if history_retention_seconds
was set to an
integral number of days because the web console shows the total number of full days only. Moreover, "7 days - default"
will be displayed for any history_retention_seconds
value below 86400 (1 day).
history_retention_seconds | web console | human-friendly duration |
---|---|---|
0 | 7 days - default | 0 |
300 | 7 days - default | 5 min |
3600 | 7 days - default | 1 hour |
43200 | 7 days - default | 12 hours |
164160 | 1 day | 1.9 days |
198720 | 2 days | 2.3 days |
604800 | 7 days - default | 7 days |
- Documentation:
- Link to the Neon logo
- End-to-end example
- Documentation: examples of project provisioning
- Updated dependencies: Neon Go SDK v0.2.2, terraform plugin SDK to 2.29.0
-
Acceptance e2e tests
-
resource_project
:- default_branch_id
-
resource_endpoint
:- id
- compute_provisioner
- suspend_timeout_seconds
-
resource_role
:- created_at
- updated_at
-
resource_endpoint
:- passwordless_access: it's not implemented yet by Neon
- current_state
- pending_state
-
resource_branch
:- connection_uri
resource_endpoint
:- autoscaling_limit_min_cu set to 0.25 by default
- autoscaling_limit_max_cu set to 0.25 by default
- type set to "read_write" by default
The release follows update of the Neon Go SDK.
- (#25) Fixed branch import
- (#26) Fixed database import
- (#32) Data type to define autoscaling limits
- Neon logo in documentation
-
resource_project
:- store_password (Note that Neon does not support "false" value yet)
- history_retention_seconds
- compute_provisioner
- quota:
- active_time_seconds
- compute_time_seconds
- written_data_bytes
- data_transfer_bytes
- logical_size_bytes
- default_endpoint_settings:
- autoscaling_limit_min_cu
- autoscaling_limit_max_cu
- suspend_timeout_seconds
- branch:
- id
- name
- role_name
- database_name
-
resource_branch
:- id
- connection_uri
-
resource_project
:- pg_settings
- cpu_quota_sec
- autoscaling_limit_min_cu
- autoscaling_limit_max_cu
- branch_logical_size_limit
- created_at
- updated_at
-
resource_branch
:- physical_size_size
- endpoint
- host
- current_state
- pending_state
- created_at
- updated_at
-
resource_database
:- created_at
- updated_at
-
resource_endpoint
:- created_at
- updated_at
- Fixed typo and indentation of documentation
- Fixed
neon_branch
recourse by provisioning an endpoint attached to a newly created branch. It is required to permit interactions with the branch to manage associated roles and databases.
- Improved documentation
- Added an end-to-end guide to provision resources for AWS application to communicate with the Neon database
- Database resource:
resource "neon_database" "this" {
project_id = "bitter-meadow-966132"
branch_id = "br-floral-mountain-251143"
name = "baz"
owner_name = "qux"
}
- Role resource:
resource "neon_role" "this" {
project_id = "bitter-meadow-966132"
branch_id = "br-floral-mountain-251143"
name = "qux"
}
- Fixed
neon_endpoint
resource provisioning when the attributepg_settings
is not set. The bug was in the Neon SDK, see details in the release notes.
- Bumped Neon Go SDK to v0.1.4
- Fixed the logic to import
neon_branch
resource by its ID.
- Endpoint resource:
resource "neon_endpoint" "this" {
project_id = "bitter-meadow-966132"
branch_id = "br-floral-mountain-251143"
type = "read_write"
}
- Added database connection details for the resource
neon_project
. Note thatdatabase_password
andconnection_uri
read-only attributes are sensitive. Make sure that terraform backend is secured and terraform state is not exposed to prevent undesirable access to database.
- Branch resource:
resource "neon_project" "this" {
name = "foo"
}
resource "neon_branch" "this" {
project_id = neon_project.this.id
name = "bar"
}
- Backoff+retry mechanism: operation is retried after the delay of 5 sec. API response's HTTP codes are 500, or 429. Total number of attempts is limited to 120 per operation.
- Bumped Neon Go SDK v0.1.3
- Added errors handling for the project resource
Neon
Provider:
terraform {
required_providers {
neon = {
source = "kislerdm/neon"
}
}
}
provider "neon" {}
- Project resource:
resource "neon_project" "this" {
name = "foo"
}