Search code examples
google-cloud-platformgoogle-cloud-sql

Is there a way to get the details of a Google Cloud SQL failover replica instance?


I know I can use gcloud sql instances describe or the Cloud SQL REST API to get the details of a Cloud SQL instance, and that I can also get the secondary zone after failover is done (e.g. gceZone).

After enabling the High Availability (regional) feature for a Cloud SQL instance, is there a way to get the details of Cloud SQL failover replica instance?


Solution

  • Is there a way to get the details of Cloud SQL failover replica instance?

    No, it used to be possible to view the corresponding Cloud SQL failover replica of a master instance in 1st generation Cloud SQL instance, but it was since changed with the arrival of 2nd generation instances.

    Consequently, this information is now occluded from the user's perspective.

    If you really want to see it, you can trigger a failover manually and the master instance will be replaced by the failover replica.

    You could try to run gcloud sql instances describe while you trigger the failover, to see if you could see any further details about the failover, but I can not confirm you that it will give you any further information.

    I hope it helps.