terraform-provider-postgresql
terraform-provider-postgresql copied to clipboard
Allow running of command(s) as root when creating a postgresql_role
Terraform Version
N/A
Affected Resource(s)
- postgresql_role
We would like to be able to run a command (or list of commands) on postgresql_role
when it is created by the terraform provider. The immediate use-case is to set specific PGAudit logging on a per-role basis, which requires running a command against each role as the root user.
At the moment, this is a tedious process that requires us to manually do it for each new role we create, rather than having it automated by the terraform configuration. It would be fantastic if we could provide a list of commands to run on the postgresql_role upon creation to set up specific configurations on the role that aren't available within the provider directly.