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

aws_eip: dissociate EIP on update #878

Merged
merged 5 commits into from
Jun 16, 2017
Merged

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Jun 15, 2017

Fixes #42 by dissociating the EIP before trying to update it. Only do this on true update and not part of the create, as there is not actual association yet. Includes regression test TestAccAWSEIP_classic_disassociate, which fails on master

Originally reported at hashicorp/terraform#3429

=== RUN   TestAccAWSEIP_basic
--- PASS: TestAccAWSEIP_basic (11.72s)
=== RUN   TestAccAWSEIP_instance
--- PASS: TestAccAWSEIP_instance (276.85s)
=== RUN   TestAccAWSEIP_network_interface
--- PASS: TestAccAWSEIP_network_interface (35.14s)
=== RUN   TestAccAWSEIP_twoEIPsOneNetworkInterface
--- PASS: TestAccAWSEIP_twoEIPsOneNetworkInterface (36.33s)
=== RUN   TestAccAWSEIP_associated_user_private_ip
--- PASS: TestAccAWSEIP_associated_user_private_ip (153.29s)
=== RUN   TestAccAWSEIP_classic_disassociate
--- PASS: TestAccAWSEIP_classic_disassociate (215.83s)

@catsby catsby added the bug Addresses a defect in current functionality. label Jun 15, 2017
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Except one mentioned nitpick this LGTM.

})
}

if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I think the conditional here is superfluous as we're resetting err to nil below. We can just return err

@ghost
Copy link

ghost commented Apr 12, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_eip — automatically disassociate eip when changing instance
2 participants