Publish v2 Proxy via Homebrew
Is someone working on a brew formula?
Not sure what that is :)
https://brew.sh/
After thinking about it more, there are some obstacles:
- cloudsql-proxy either looks at
GOOGLE_APPLICATION_CREDENTIALSenv variable or at the flag-credential_file. - When using/installing
gcloud, neither the env variable is set nor is there a service account key file.
So gcloud and cloudsql-proxy are not compatible as of today, I believe.
Ultimately, it would be really nice if the proxy would be available with:
gcloud sql instances proxy <instance>
If you don't set the env variable or the flag, the Proxy will still get the
authentication used in gcloud if you have run gcloud auth login
word! just tried again, no idea what I was doing wrong before.
I have zero experience with homebrew, but if you would like to submit a formula I would be very gracious!
I will look into this prob within the next days.
Any updates? If not we can leave the issue open as a feature request for anyone who finds the time, but this isn't something I will be able to spend time on personally.
Priorities shifted unfortunately. I'm not actively looking into this right now.
Closing - this issue hasn't been updated for over 6 months and appears to be abandoned.
I know this issue is outdated, but just in case anyone wonders how to install cloud_sql_proxy via brew it is possible now by using gcloud:
brew cask install google-cloud-sdkgcloud components install cloud_sql_proxy
EDIT: You can then find the binary in:
/usr/local/google-cloud-sdk/bin/cloud_sql_proxy
A follow up on @andrmueller point; The binaries are now stored in
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin
This seems to be installing an old version (1.13, latest is 1.17). Am I doing something wrong? I tried running gcloud components update but it still wants to install 1.13.
@jgonera Unfortunately the gcloud version being outdated is a known issue - see #408
Hello I actually might need some similar help with /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/cloud_sql_proxy -instances= server info
When i run this i get: No such file or directory anyone know what the issue might be?
Was any work done on this?
Never mind. Just saw the last message! Good day.
There is an unofficial brew formula here: https://github.com/tclass/homebrew-cloud_sql_proxy.
However, it compiles from source which requires Go. It remains easiest to just download the latest version from the Releases page.
another A follow-up on @andrmueller point; The binaries are now here:
/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/cloud_sql_proxy
Re-opening as this would make life easier for lots of folks. Seems worth pursuing, although I can't promise a timeline presently.