Dynamic DO Droplets' creation and configuration of

May 29, 2019 518 views
Automated Setups Applications Terraform Ubuntu

Currently I'm developing an API REST with NodeJS. What I want to do is everytime an User register in my system, create a new droplet, deploy and run an instance of the API REST previously mentioned and add a new DNS record for that new Droplet.

I don't know if I can achieve that requirement with tools like Chef or Terraform.

Any ideas?

Thanks in advance.

1 Answer

You could integrate your API with the digital ocean API and create a new Droplet (with the help of the request module).

https://developers.digitalocean.com/documentation/v2/#droplets

You could use the same API to create your DNS records by the looks of things.

https://developers.digitalocean.com/documentation/v2/#domain-records

I imagine that you're probably already aware that this level of automation is risky business (given that you could incur significant charges if your API is insecure).

Good luck!

Have another answer? Share your knowledge.