Neki, sharded Postgres, is now available. Learn more
Navigation

Manage Neki router parameters with Terraform

The PlanetScale Terraform provider v1.13.0 adds parameter management to planetscale_neki_router. You can configure router settings in Terraform and read them through the router data source.

resource "planetscale_neki_router" "app" {
  organization = "acme"
  database     = "app-db"
  branch       = "main"
  name         = "app"

  parameters = {
    router = {
      "idle-session-timeout"          = "10m"
      "replication-lag-tolerable-min" = "5s"
    }
  }
}

When you configure parameters, Terraform resets omitted customer-configurable parameters to their defaults.

The planetscale_databases data source now supports filtering by kind: mysql, postgresql, or neki.

If you manage Postgres bouncers with Terraform, upgrade to v1.14.0 or later. Earlier provider versions can't read bouncers after recent changes to how PgBouncer parameters are reported.

This release also fixes persistent drift from locked Neki parameters that require an update before they can change. Terraform now ignores those parameters unless it already manages them.

Read more in the docs