I have create a cloud sql instance as shown below -
I have also allowed all network (0.0.0.0/0) under authorised network. But when I try to connect it using gcloud sql connect <ip address> -u <username> I get this error -
ERROR: (gcloud.sql.connect) HTTPError 400: Invalid request: instance name (34.69.175.233).
When I run the same command like this gcloud sql connect <ip address> -u <username> --log-http for the log I get this -
{ "error": { "code": 400, "message": "Invalid request: instance name (34.69.175.233).", "errors": [ { "message": "Invalid request: instance name (34.69.175.233).", "domain": "global", "reason": "invalid" } ] } } I am not able to identify what exactly is the problem.

gcloud sql connect ...requires the instance name (not IP) and uses the SQL proxy to connect to the instance.gcloud sql connectwith SQL Server