<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Unfortunately I can't post the full resource agent here.</div><div class="gmail_quote"><br></div><div class="gmail_quote">In our search for solutions we did find a resource agent for managing AWS Elastic IPs: <a href="https://github.com/moomindani/aws-eip-resource-agent/blob/master/eip">https://github.com/moomindani/aws-eip-resource-agent/blob/master/eip</a>.  This was not what we wanted, but it will give you an idea of how it can work.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Our script manages secondary private IPs by using:</div><div class="gmail_quote"><br></div><div class="gmail_quote">aws ec2 assign-private-ip-addresses<br></div><div class="gmail_quote"><div class="gmail_quote">aws ec2 unassign-private-ip-addresses<br></div><div class="gmail_quote">aws ec2 describe-network-interfaces<br></div><div class="gmail_quote"><br></div></div><div class="gmail_quote"><br></div><div class="gmail_quote">There are a few things to consider:</div><div class="gmail_quote">* The AWS call to assign IPs to an EC2 instance is asynchronous (or it was the last time I checked), so you have to wait a bit (or poll AWS/Azure until the IP is ready).</div><div class="gmail_quote">* The IP change is slower than a normal VIP change on the machine, so expect a slightly longer outage.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Leon</div><div class="gmail_quote"><br></div></div></div>