Hey! How do you guys create roles and grants for a...
# google-cloud
b
Hey! How do you guys create roles and grants for a CloudSQL Postgre Instances?
l
b
@limited-rainbow-51650, if I do it via this module, it adds a role to a superusers group. How do you solve this problem?
l
What do you mean with “it adds a role to a superusers group”?
b
so, if you add a user via console in GCP, it adds that user to a special group (predefined by google)
Since this module uses google's api, it does the same thing, regardless of the grants
But, it is not the biggest problem. The biggest problem is that https://github.com/pulumi/pulumi-postgresql (which I think is the module itself), doesn't support TLS. There is no way to specify client cert, key and server CA. So, for me, it is unacceptable to create users via unsecured connection
If you put 'sslmode' to verifyca, or even required, you will have that error
This module uses a terraform provider https://github.com/terraform-providers/terraform-provider-postgresql. I even tried libpq configuration file, but there is no way to specify SERVICE NAME https://www.postgresql.org/docs/current/libpq-pgservice.html. I also tried env variables, but there is no way to get it working https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS