Ecto connection error with gcloud postgres instance

Well, what you specified as a hostname does not indeed look like a valid one.

Try ping '/cloudsql/<project_name>:<region>:<instance_name>' in your terminal.

Also you have a syntax error – at least here in the forum post, maybe not inside your config file – where you are missing a closing " after the supposed hostname.