-
Notifications
You must be signed in to change notification settings - Fork 59
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
disassociate_first optional flag #19
Comments
Looking for same feature. aws ec2 associate-address --instance-id=$EC2INSTANCE_ID --allocation-id=$EIPALLOC_ID --allow-reassociation --region=$EC2REGION |
is there any update on this? If no-one is planning or currently working on it - I could contribute a PR for this. Please let me know. Thanks! |
@ankitcha No active work ongoing for this one. Please submit a PR. I'd be happy to review and merge. |
I need this too. I will submit a PR. |
Hi Sebastian, How I need to run this code in Lambda ? |
With boto3 in master, I've put up a branch that adds support for controlling AllowReassociation via a CLI flag: https://github.com/pmkane/aws-ec2-assign-elastic-ip/tree/allow_reassociation Currently, it does not prefer to assign unassociated IPs, in the case that multiple IPs are available for association. This meets our internal requirements, but I imagine could be surprising behavior if someone runs the command without any command-line requirements. In our own use case, we would only use --allow-reassociation in combination with --valid-ips with a single IP specified. If that fit other folks' requirements too, we could enforce that policy in the tool. Thoughts @sebdah or others? |
@pmkane I think there is a clear use case for However, maybe a safe behavior would be to enforce Happy to review / merge etc, so feel free to submit a PR. |
In addition to ☝️, #40 is adding a flag |
👍 I think you can go ahead 🙇, there's some work to get #40 ready for merging. |
Feature request: There are several use cases where it is desirable that a newly launched instance can be guaranteed to have/steal an address from a pool of existing addresses that may all be attached. Our use cases is rolling docker deployments. #15 is similar.
A flag like "disassociate_first" that will simply perform a disassociate call on the elastic IP
http://docs.aws.amazon.com/cli/latest/reference/ec2/disassociate-address.html
before trying to acquire the address would seemingly solve our problem. If the flag is false by default it shouldn't be an issue to any existing users.
The text was updated successfully, but these errors were encountered: