Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

imrannayer
Copy link
Collaborator

No description provided.

@imrannayer
Copy link
Collaborator Author

/gcbrun

@imrannayer imrannayer changed the title feat(TPG>=5.12)!: Add option to create and failover a replica instance using terraform module feat(TPG>=5.12)!: Add option to create and failover a replica instance in postgresql sub-module Feb 29, 2024
@imrannayer imrannayer changed the title feat(TPG>=5.12)!: Add option to create and failover a replica instance in postgresql sub-module feat(TPG>=5.12)!: Add option to create and failover a replica instance in postgresql and MsSQL sub-module Mar 4, 2024
@imrannayer imrannayer changed the title feat(TPG>=5.12)!: Add option to create and failover a replica instance in postgresql and MsSQL sub-module feat(TPG>=5.12)!: Add option to create and failover a replica instance in Postgresql and MsSQL sub-module Mar 4, 2024
@imrannayer
Copy link
Collaborator Author

/gcbrun

@g-awmalik g-awmalik self-assigned this Mar 5, 2024
Copy link
Contributor

@g-awmalik g-awmalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. Please review my comments.

modules/mssql/main.tf Outdated Show resolved Hide resolved
modules/mssql/variables.tf Outdated Show resolved Hide resolved
modules/mssql/variables.tf Show resolved Hide resolved
modules/postgresql/variables.tf Outdated Show resolved Hide resolved
modules/postgresql/versions.tf Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please combine main.tf, mssql1.tf and mssql2.tf together into main.tf.

examples/postgresql-with-cross-region-failover/main.tf Outdated Show resolved Hide resolved
examples/postgresql-with-cross-region-failover/pg1.tf Outdated Show resolved Hide resolved
examples/postgresql-with-cross-region-failover/pg2.tf Outdated Show resolved Hide resolved
@imrannayer
Copy link
Collaborator Author

@g-awmalik fixed. Can u plz review?

@g-awmalik g-awmalik merged commit 141e54a into terraform-google-modules:master Mar 8, 2024
4 checks passed
@aleksandersumowski
Copy link

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
Copy link
Collaborator Author

@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
Copy link

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 imrannayer deleted the feat/postgres-failover-options branch April 4, 2024 20:45
@imrannayer
Copy link
Collaborator Author

@aleksandersumowski according to my understanding:

  • availability_type for replica has to be Zonal. It can be change after the failover. If this is not the case then go ahead and test it and create an issue. We can fix the doc.
  • Setting up default DB or additional user etc will be an issue when u recreate primary as secondary and have to remove these configurations as they may already exists. If you can handle it then go ahead and try.

@imrannayer imrannayer self-assigned this Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants