GoogleCloudPlatform / cloud-sql-proxy

A utility for connecting securely to your Cloud SQL instances
Apache License 2.0
1.25k stars 345 forks source link

Brief summary of the proposed feature #2244

Closed lz000 closed 1 month ago

lz000 commented 1 month ago

Feature Description

Support a flag to ignore non-existing instances. Currently script terminate with error errors parsing config: googleapi: Error 404: The Cloud SQL instance does not exist., instanceDoesNotExist when non-existing instances specified. In the event of disaster recovery, a database replica will be promoted and the old master instance will be deleted. App has embeded failover mechanism that will auto connect to the new master instance without us changing the code and redeploy. However if cloudsql proxy is restarted by any chance, the container will keep crashing because of this error. This will requires us to change the code and redeploy. It will helpful to disaster recovery if we can introduce a flag to ignore non-existing instances during startup

Sample code

// sample code here

Alternatives Considered

No response

Additional Details

No response