Hi and thanks for reading.
ON_DEMAND parameter is marked as deprecated and should not be used. Serverless SQL database doesn't exists on Google Cloud.
You could imagine to listen the logs (for example a sink in PubSub or use EventArc) and when you have a DB connect error entry to start the Cloud SQL instance.
However, it takes several seconds to start the instance and you need to resend the request to the service (which raise the Database connection error) to replay your test.
Will it be an acceptable solution?