Issue
I wish to create several droplets (DigitalOcean) in a loop and then run Ansible afterwards on the droplets to setup the required software and security measures. Is this possible like terraform? If so, how would this look in javascript/typescript code?
There isn't anything in google that has any examples to create this or any mention of Pulumi with Ansible.
Solution
Yes, this is possible.
You can do it one of 2 ways:
You can specify your ansible run inside the userdata of the DigitalOcean droplet. This works across all language SDKs.
Alternatively, if you want to have similar functionality to Terraform's remote-exec provisioner, you can use Pulumi's dynamic providers to create a provisioner.
Dynamic Providers are currently available in the TypeScript and Python SDKs. You can find python example here and a TypeScript example here
Answered By - jaxxstorm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.