-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Conversation
There was a problem hiding this 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.
aws/resource_aws_eip.go
Outdated
}) | ||
} | ||
|
||
if err != nil { |
There was a problem hiding this comment.
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
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! |
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 onmaster
Originally reported at hashicorp/terraform#3429