devopsgroup-io / vagrant-digitalocean

:droplet: A Vagrant provider plugin that manages DigitalOcean droplets.
Mozilla Public License 2.0
1.71k stars 181 forks source link

Ability to configure a Floating IP #278

Open bobjohnbob opened 6 years ago

bobjohnbob commented 6 years ago

It would be nice to be able to specify (along with image/size/region) a floating IP to use on the droplet. Being created. When I setup a 'Vagrantfile' I typically make all these settings configurable via a file(along with a set of default settings). I would like to allow the developer to specify a floating IP(which is already provisioned and not assigned on the DO account) to attach to the droplet after it's up and running.

This is particularly useful for our application which requires a domain/subdomain be pointed to it to function properly (it's core to the functionality of the application) so that we don't have to change dns records and wait for TTL, or update /etc/host records each time we recreate the droplet.

If this is really easy to do and you can point me in the right direction, I can take a look at submitting a pull request, but my ruby experience it pretty rudimentary (I have only ever used it for editing "Vagrantfile"s)

kwakwaversal commented 5 years ago

I've opened a MR for this @bobjohnbob so hopefully it'll be merged in at some point. I patched my local copy a while ago and use it quite often - only just got around to pushing it upstream so it definitely works! 👍

utkonos commented 1 year ago

This would be a great feature. I want to note that the endpoints and DigitalOcean feature name is now "Private IP".

https://docs.digitalocean.com/reference/api/api-reference/#tag/Reserved-IP-Actions

The endpoints would then be changed from floating_ips to reserved_ips in the URL path.