https://pulumi.com logo
Title
l

lemon-wire-69305

01/14/2023, 5:20 AM
CloudSQL Postgres Roles - is it possible to create these with Pulumi? I've created three different database users: • migration user (IAM user for db migrations) • server user (IAM user for server connections) • dev user (Built-in user for debugging etc) I'd like to give all three users a postgres role (e.g. 'my_org') that all operations occur under (e.g. tables creation, data CRUD, manual login to debug). I did find someone doing this via pulumi (https://stackoverflow.com/questions/66678471/how-to-deploy-postgresql-schema-to-google-cloud-sql-database-using-pulumi), but it seems like quite a hack (commenting / uncommenting code) - in which case, I figure I may as well create a custom script and run that separately. Is it possible to add postgers roles as part of the
pulumi up
process, or scripted in such a way that after a
pulumi up
no other manual process needs to be run? It's also possible that I'm thinking of this in the wrong way, so I'm curious to hear if there's a better solution to this problem.