I'm really confused about how IAM login works with AlloyDB. I don't see anything in the docs about mapping postgres users to IAM service accounts.
With Cloud SQL Postgres I can do this: https://cloud.google.com/sql/docs/postgres/authentication
CLOUD_IAM_SERVICE_ACCOUNT
, (gcloud sql users create <GSA> --type=CLOUD_IAM_SERVICE_ACCOUNT
)Applications auth to their own postgres DB through their IAM service account (via the proxy) and cannot access other DBs on the postgres server.
How do I do this with AlloyDB?
Looking at the docs I see some mention of CLOUD_IAM_USER
https://cloud.google.com/alloydb/docs/database-users/about#view-list
But I cannot see how to create AlloyDB users via the API:
Does the sql users
API also support AlloyDB? With Cloud SQL I can create IAM service account users via the Cloud SQL API.
Manual IAM authentication is now available.
https://cloud.google.com/alloydb/docs/manage-iam-authn
Automatic IAM Authentication (where the AlloyDB Proxy handles the OAuth2 token for you) isn't available yet, though.