I'm asking this question as I did not find the answer to this specific point anywhere.
I'm using terraform to create a cloudsql, it's users and databases. This is relatively simple but it gets complicated when you are trying to limit the users inside the cloudsql (postgres/mysql...).
To not have multiple super-user, I'm using the iam service account user type when creating the user, meaning the user won't have any rights to do anything but connect to the cloudsql but I would like to be able, in terraform, to associate the account I create with a database but that doesn't seems possible currently with the available options of database or users resources.
Does anyone has an idea on how to do that?