Skip to content

Commit 7afdf4a

Browse files
committed
docs: clarify google_sql_database_instance edition default (PG16 -> ENTERPRISE_PLUS) and tier compatibility
1 parent 7b2c6fe commit 7afdf4a

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,16 @@ The `settings` block supports:
431431

432432
* `tier` - (Required) The machine type to use. See [tiers](https://cloud.google.com/sql/docs/admin-api/v1beta4/tiers)
433433
for more details and supported versions. Postgres supports only shared-core machine types,
434-
and custom machine types such as `db-custom-2-13312`. See the [Custom Machine Type Documentation](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) to learn about specifying custom machine types.
435-
436-
* `edition` - (Optional) The edition of the instance, can be `ENTERPRISE` or `ENTERPRISE_PLUS`.
434+
and custom machine types such as `db-custom-2-13312`. See the [Custom Machine Type Documentation](https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type#create) to learn about specifying custom machine types. Note that shared-core and custom machine types are valid only under the `ENTERPRISE` edition; PostgreSQL 16+ instances default to `ENTERPRISE_PLUS` when `edition` is unset (see the `edition` argument below).
435+
436+
* `edition` - (Optional) The edition of the instance, can be `ENTERPRISE` or `ENTERPRISE_PLUS`. If `edition`
437+
is not set, the Cloud SQL API determines the default based on `database_version`: instances with
438+
`database_version` `POSTGRES_16` or later default to `ENTERPRISE_PLUS`, while all others default to
439+
`ENTERPRISE`. Note that `ENTERPRISE_PLUS` supports only predefined `db-perf-optimized-N-*` machine
440+
types (the `N2`/`C4A` series); shared-core and custom tiers such as `db-g1-small`, `db-f1-micro`, and
441+
`db-custom-*` require `edition = "ENTERPRISE"`. Omitting `edition` on a PostgreSQL 16+ instance while
442+
setting a shared-core or custom `tier` therefore fails at create time with
443+
`Invalid Tier (...) for (ENTERPRISE_PLUS) Edition`.
437444

438445
* `user_labels` - (Optional) A set of key/value user label pairs to assign to the instance.
439446

0 commit comments

Comments
 (0)