thousands-area-40147
08/19/2021, 4:02 PM@pulumi/postgresql
to create a role on an Aurora postgresql database after its creation, much like shown in this blog post for mysql and an RDS instance (second example). Unfortunately, I have no luck and run into a timeout error:
postgresql:index:Role (<role name>):
error: could not start transaction: dial tcp xx.x.x.xxx:5432: connect: operation timed out
Found an issue on Github that seemed related, but wasn't able to derive a solution for my case from it.
This is the part of the program that is supposed to create the role:
this.postgresProvider = new postgresql.Provider('aurora-postgresql', {
expectedVersion: this.cluster.engineVersion,
host: this.cluster.endpoint,
password: this.password.result,
port: this.cluster.port,
username: this.cluster.masterUsername
}, {
parent: this.cluster
});
this.postgresUser = new postgresql.Role(<role name>, {
createDatabase: true,
createRole: true,
login: true,
name: <role name>,
roles: ['rds_iam']
}, {
parent: this.postgresProvider,
provider: this.postgresProvider
});
The instances on the cluster are set to not be publicly accessible, in case that has anything to do with it. Any help and pointers would be greatly appreciated! Cheers ✌️bored-table-20691
08/19/2021, 4:34 PMthousands-area-40147
08/19/2021, 4:36 PMbored-table-20691
08/19/2021, 4:40 PMthousands-area-40147
08/19/2021, 4:47 PMendpoint
parameter of the postgresql.Provider
to localhost
and now it works. The problem is that when the entire stack is provisioned at once (and setting up the bastion host through which the connection goes is part of it), establishing the SSH tunnel would have to be part of the program. Still, this is progress, so thank you a lot! 😄bored-table-20691
08/19/2021, 4:54 PMgreat-sunset-355
08/19/2021, 5:33 PMthousands-area-40147
08/19/2021, 5:37 PMgreat-sunset-355
08/19/2021, 5:41 PMthousands-area-40147
08/19/2021, 5:44 PM