From 4db137d348f1d878bb67a8c09a17a551584a62dc Mon Sep 17 00:00:00 2001 From: Hsiu-Fan Wang Date: Fri, 7 Sep 2018 16:10:19 -0700 Subject: [PATCH] Set default value for IP preferences to be public then private. If an instance has no public IP and a private IP, the proxy client will then attempt to connect to the private IP. --- cmd/cloud_sql_proxy/cloud_sql_proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cloud_sql_proxy/cloud_sql_proxy.go b/cmd/cloud_sql_proxy/cloud_sql_proxy.go index a32db8faf..6d8686de9 100644 --- a/cmd/cloud_sql_proxy/cloud_sql_proxy.go +++ b/cmd/cloud_sql_proxy/cloud_sql_proxy.go @@ -81,7 +81,7 @@ can be removed automatically by this program.`) token = flag.String("token", "", "When set, the proxy uses this Bearer token for authorization.") tokenFile = flag.String("credential_file", "", `If provided, this json file will be used to retrieve Service Account credentials. You may set the GOOGLE_APPLICATION_CREDENTIALS environment variable for the same effect.`) - ipAddressTypes = flag.String("ip_address_types", "PRIMARY", "Default to be 'PRIMARY'. Options: a list of strings separated by ',', e.g. 'PRIMARY, PRIVATE' ") + ipAddressTypes = flag.String("ip_address_types", "PRIMARY,PRIVATE", "Default to be 'PRIMARY'. Options: a list of strings separated by ',', e.g. 'PRIMARY, PRIVATE' ") // Setting to choose what API to connect to host = flag.String("host", "https://www.googleapis.com/sql/v1beta4/", "When set, the proxy uses this host as the base API path.")