-
Notifications
You must be signed in to change notification settings - Fork 422
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: add master_instance_name and instance_type to mysql module #556
feat: add master_instance_name and instance_type to mysql module #556
Conversation
… the 'root' google_sql_database_instance, which can be used to create a replica and promote it to source (master)
@OscarVanL thx for the PR. We already have replica code where these parameters are passed. That specific code is for Master instance. Replica code is here. |
Hi @imrannayer I think it would help for me to elaborate on the use-case I described in the feature request more so you have more context. I want to create a CloudSQL instance that replicates from my on-prem MySQL instance that will at a later stage become the master. To start with, I want to create some cascading replicas from my on-prem database in CloudSQL. The instance I changed (which currently can only act as the master) will begin as the "root" replica. In the diagram below it is the root replica: Initially, there will be no master in CloudSQL, only replicas. Eventually once I'm ready, the "root" CloudSQL instance will be promoted to the master instance and my on-premises DB will be shut down: This can be achieved using the fields I have exposed here to point to my sql_source_representation_instance, then later removing this field and assigning the instance_type to promote that instance. I hope this gives some clarity on why I want the resource I edited to act as a replica. |
/gcbrun |
@imrannayer Hey, apologies I found a mistake in this PR. Please hold the release of 18.2.0. I should also prevent backups being defined for the replica instance as replicas do not support backups. I will make a follow-up PR shortly. |
Relates to my feature request: #554
fix #554