Unable to access postgres from gke

57 Views Asked by At

I am trying to make postgres accessible from my GKE cluster. For this I have created a GSA with enough permissions to access postgres, KSA, Role, Rolebindings and created a iam_member with role Workload Identity. In short KSA will assume all permissions of GSA. This setup works fine when I use my built-in username to access postgres but when I try to access it with google_sql_user of type CLOUD_IAM_SERVICE_ACCOUNT, I am getting an error that this user doesn't have permissions. Do I need to provide separate permissions to this user , if yes, how to do that using terraform?

0

There are 0 best solutions below