cyrilgdn / terraform-provider-postgresql

Terraform PostgreSQL provider
https://www.terraform.io/docs/providers/postgresql/
Mozilla Public License 2.0
356 stars 182 forks source link

postgresql_database should use template1 by default #325

Open yorik opened 11 months ago

yorik commented 11 months ago

Hi there,

It would be better to set template to template1 in postgresql_database: template1 is default behaviour in PostgreSQL and more importantly some cloud providers like GCP set owner of template0 schema to inaccessible superuser (in case of GCP it is cloudsqladmin). So there is no way to change that later without recreating the database.

I understand that this will be breaking changes and could affect users of the provider, but it will also save a lot of work for people creating new databases on GCP or AWS.

Thank you!

References

Similar issue with AWS: