https://pulumi.com logo
#general
Title
# general
h

hundreds-portugal-17080

07/29/2019, 4:15 AM
Hi, I want to run some mysql init scripts to turn on mysql bin log and create tables after "new aws.rds.Instance" is created. Can you suggest how to do it using Pulumi? In terraform, we could use provisioner.
c

cool-egg-852

07/29/2019, 2:43 PM
https://github.com/pulumi/pulumi-mysql - I would use this to create the tables.
Also since it’s for RDS, I believe if you setup a backup retention period for the instance > 0 days, it’ll enable the bin logs. For that you could configure it with pulumi.
h

hundreds-portugal-17080

07/29/2019, 4:59 PM
thank you. if i understand correctly, spin up rds using pulumi api (new aws.rds.Instance) first and then use pulumi-mysql to create the ddl's ?
c

cool-egg-852

07/30/2019, 7:21 PM
That’s my recommendation