hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.04k stars 9.47k forks source link

DigitalOcean: support floating IPs #3580

Closed rmoriz closed 8 years ago

rmoriz commented 8 years ago

Please support DigitialOcean's Floating IPs, as described on https://www.digitalocean.com/company/blog/floating-ips-start-architecting-your-applications-for-high-availability/

API:

nekinie commented 8 years ago

:+1:

reinoudk commented 8 years ago

I'm working on a PR and wanted to check if it's correct to put Floating IP assignment under the update function? That way you can unassign a Floating IP by leaving out the droplet_id and vise versa.

pierrebeaucamp commented 8 years ago

+1

catsby commented 8 years ago

@reinoudk That sounds reasonable, yes. Once you have the code working send a PR and we can review and discuss further

Thanks!

reinoudk commented 8 years ago

Just updated the PR, fixing some typos. As it currently stands you can create a Floating IP specifying a droplet_id or region. If you specify both, the DO API automatically assigns the IP to the droplet. This also works if you omit the region.

The update function only checks if the droplet_id has changed and consequently (re)assigns or unassigns the IP. The latter creates a bit of an odd situation if you didn't specify a region though. You'd have an IP you can assign, but no indication from your config in which region the IP is available.

Also, how should a change in region be handled? Floating IP's can't be tranfered and the resource would actually need to be deleted and recreated, changing the ID..

patrickheeney commented 8 years ago

It looks like this is implemented in #3748 . Is there anything stopping a merge?

jen20 commented 8 years ago

@patrickheeney I merged #3748 the other day, but didn't spot this as related in order to close it as well. Closing now!

reinoudk commented 8 years ago

@jen20 I think PR #3597 can be closed then as well.

jen20 commented 8 years ago

Thanks - sorry I didn't spot that one when I merged #3748!

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.