Neki, sharded Postgres, is now available. Get started
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.13.0. PgBouncer timeout parameters will soon report their type as time instead of seconds. After that change, earlier provider versions fail to read bouncers.

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