terraform-google-modules / terraform-google-sql-db

Creates a Cloud SQL database instance
https://registry.terraform.io/modules/terraform-google-modules/sql-db/google
Apache License 2.0
265 stars 425 forks source link

feat(TPG>=5.12)!: Add option to create and failover a replica instance in Postgresql and MsSQL sub-module #582

Closed imrannayer closed 8 months ago

imrannayer commented 8 months ago

/gcbrun

imrannayer commented 8 months ago

/gcbrun

imrannayer commented 8 months ago

@g-awmalik fixed. Can u plz review?

aleksandersumowski commented 7 months ago

Hi Imran, that's an exciting and very timely for me feature. Can I ask why this ups the TPG requirement to 5.12?

imrannayer commented 7 months ago

@aleksandersumowski thanks for the feedback. PR 16932 is part of [5.12]( replica_configuration, ca_cert, and server_ca_cert fields to be flagged sensitive) which makes replica_configuration, ca_cert, and server_ca_cert fields to be flagged sensitive.

aleksandersumowski commented 7 months ago

Could I also ask you why the failover procedure has these preconditions?

- Set `enable_default_db` and `enable_default_user` to `null`
- Dont set `additional_databases`, `user_name`, `user_password` and `additional_users`
- `availability_type` in all replica should be set to `ZONAL`
imrannayer commented 7 months ago

@aleksandersumowski according to my understanding: