Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/digitalocean: Do not force the creation of a new IP when the droplet_id changes #4476

Conversation

ColinHebert
Copy link
Contributor

Fixes #4299

The droplet_id isn't mandatory and the expected behaviour of the floating IP is to stick around even when the droplet is destroyed/recreated.

@ColinHebert
Copy link
Contributor Author

@radeksimko @jen20 Can we go ahead with this PR?

func resourceDigitalOceanFloatingIpUpdate(d *schema.ResourceData, meta interface{}) error {
client := meta.(*godo.Client)

if v, ok := d.GetOk("droplet_id"); ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably check here whether there is a change prior to reassigning the floating IP?

@jen20
Copy link
Contributor

jen20 commented Jan 19, 2016

Hi @ColinHebert! I've just looked over this - I left a comment inline. Thanks for opening the PR!

@ColinHebert
Copy link
Contributor Author

@jen20 good suggestion. I updated the PR

@jen20
Copy link
Contributor

jen20 commented Jan 21, 2016

Hi @ColinHebert - looks like there are so gofmt issues with this. I'm going to pull it locally and fix it up before merging now.

@jen20
Copy link
Contributor

jen20 commented Jan 21, 2016

I've fixed up the formatting and squashed these commits into f6d80f2, which is now on master. Thanks for you work @ColinHebert!

@jen20 jen20 closed this Jan 21, 2016
@ColinHebert ColinHebert deleted the digitalocean_floatingip_keptaround branch January 30, 2016 21:28
@ghost
Copy link

ghost commented Apr 28, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DigitalOcean floating IP destroyed on droplet refresh
3 participants