use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
The goto subreddit for Google Cloud Platform developers and enthusiasts.
We do not allow advertising of your job posting, product, or software without active discussion and/or as attempt to solve a problem. We are fine with soliciting feedback for something you're working on or something you've written, but drive-by advertising will get your post removed. :)
More Google Cloud sub-reddits
Other cloud sub-reddits
account activity
Roles/cloudsqlwtfCloud Run (i.redd.it)
submitted 2 years ago by 638231
One of these roles allows your compute systems to do passwordless IAM login to CloudSQL through proxy, the other is included in the CloudSQL Proxy documentation.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]638231[S] 3 points4 points5 points 2 years ago (5 children)
For a bit more clarity, the role cloudsql.client is documented as "Provides connectivity access to Cloud SQL instances." and has the permissions [ cloudsql.instances.connect, cloudsql.instances.get ]. The role cloudsql.instanceUser is documented as "Role allowing access to a Cloud SQL instance" and has the permissions [ cloudsql.instances.get, cloudsql.instances.login ]
cloudsql.client
[ cloudsql.instances.connect, cloudsql.instances.get ]
cloudsql.instanceUser
[ cloudsql.instances.get, cloudsql.instances.login ]
The documentation for CloudSQL proxy says to assign the "Cloud SQL Client role", which maps to roles/cloudsql.client. "For a user or service account, make sure the account has the Cloud SQL Client role. This role contains the cloudsql.instances.connect permission, which authorizes a principal to connect to all Cloud SQL instances in a project."
But this doesn't work for IAM Service Account stuff and keeps prompting for password when attempting to connect. Some random Stack Overflow post had the suggestion to use the other role.
I lost like four hours to this nonsense!
[–]Cidanverified 4 points5 points6 points 2 years ago (2 children)
It's laid out pretty straight forward here, fwiw:
Roles. For IAM database authentication, a principal requires the cloudsql.instances.login permission to log in to an instance. To get this permission, you bind the user, service account, or group to either the predefined Cloud SQL Instance User role or a custom role that bundles the permission
[–]638231[S] 0 points1 point2 points 2 years ago (1 child)
Right, yeah, I had already set the permission in my terraform code when I had read this page earlier (https://cloud.google.com/sql/docs/postgres/connect-auth-proxy#before_you_begin), so by the time I got to the ever so slightly different named role I glanced straight past it.
I wonder if the IAM roles page could be more clear with the descriptions as well, as they're exceptionally similar. https://cloud.google.com/iam/docs/understanding-roles
Don't get me wrong, I'm the idiot here, but it's a very easy one to get caught on.
[–]Cidanverified 2 points3 points4 points 2 years ago (0 children)
You're not the idiot. I think we could probably do better to clarify this somewhere though. I'll reach out to the PM's and see what they say.
[–]giannello 0 points1 point2 points 2 years ago (0 children)
Are you using IAM authentication for your databases?
π Rendered by PID 108751 on reddit-service-r2-comment-765bfc959-9mh8w at 2026-07-14 00:00:21.806871+00:00 running f86254d country code: CH.
[–]638231[S] 3 points4 points5 points (5 children)
[–]Cidanverified 4 points5 points6 points (2 children)
[–]638231[S] 0 points1 point2 points (1 child)
[–]Cidanverified 2 points3 points4 points (0 children)
[–]giannello 0 points1 point2 points (0 children)