-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
bug: AWS EIP (dis)association fails on non-EC2-Classic accounts #1598
Conversation
- Prevent "Invalid value '' for PublicIp." errors from happening
b052eca
to
a163b0e
Compare
I just hit this and solved it another way: - assocIds := []*string{}
- publicIps := []*string{}
+ var publicIps []*string
+ var assocIds []*string
if domain == "vpc" {
assocIds = []*string{aws.String(id)}
} else { the correct one is still populated via the I did not test your scenario, I just recall seeing it. Does my attempt fix yours as well (at least in this context), and it one way better? Thanks 😄 |
@catsby Just left a comment in your PR. I can remove two commits and just leave the bugfix for the IGW issue, but I will need you to merge your fix first, then I can rebase and do all the git magic. 🏄 |
Sorry for the delay – we'll get this sorted today |
@radeksimko I just merged #1618 |
Bugfix separated into #1776 |
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. |
As @pmoust mentioned in #1596
Test plan
All tested in a fresh new account (no EC2 Classic), it may need some testing in EC2 Classic too, but I don't have access to any.
15b68fe
I'm happy to send 15b68fe as a separate PR, but it depends on the other commits as it's changing the same file.
How to replicate
Output (that's still valid):
destroy
:The instance ID is saved to state file even though the API request ends up in error, which then results in trying to remove association which doesn't actually exist = corrupted state.