Automate Deployment and Database API woes


We are needing to completely automate the deployment of a new instance (which we already know we can do through the API). The problem is - the DB information.

Our application is a single instance app that has to have the DB username and password placed in a config file at the root of the new deployed app.

The problem is, we can automatically create the app. But, then we cannot gain access (through the API) to get the DB username and password to place it in the config file. Cloudways API does not allow for this.

I am wondering if anyone else has ran into this limitation and if someone else has come up with any type of solution or workaround at all? Thanks!