I have multiple secondary IPs on multiple ENIs, and I'm trying to allocate and then associate EIPs to all IPs (primary and secondary) on each ENI - up to the limit the instance allows. I am using t4g.small which allows 2 interfaces with 4 IPs per interface (ref: https://docs.aws.amazon.com/ec2/latest/instancetypes/gp.html).
What I see happening is with a list of 6 items, only 2 EIPs are ever allocated and they are associated with the primary IP on each ENI. When I check the tags on the 2 EIPs that are created, I see the "ip" tag has a value that does not match the private_ip_address it has been associated with - so it looks like the loop is overwriting tags and for some reason not allocating a new EIP.
Issue Type
Bug Report
Component Name
amazon.aws.ec2_eip
Ansible Version
$ ansible --version
ansible [core 2.15.12]
python version = 3.12.4
jinja version = 3.1.4
Collection Versions
$ ansible-galaxy collection list
amazon.aws 8.1.0
AWS SDK versions
$ pip show boto boto3 botocore
WARNING: Package(s) not found: boto
Name: boto3
Version: 1.34.131
---
Name: botocore
Version: 1.34.131
the below task returns changed for all items, but only 2 EIPs are ever allocated, and they are associated with the primary IP of each ENI. When I check the tags on the 2 EIPs they do not match the private_ip_address they are associated with.
I expect 6 EIPs to be allocated and associated with primary and secondary private IP addresse. This can be achieved when done manually in the AWS console.
Summary
I have multiple secondary IPs on multiple ENIs, and I'm trying to allocate and then associate EIPs to all IPs (primary and secondary) on each ENI - up to the limit the instance allows. I am using t4g.small which allows 2 interfaces with 4 IPs per interface (ref: https://docs.aws.amazon.com/ec2/latest/instancetypes/gp.html).
What I see happening is with a list of 6 items, only 2 EIPs are ever allocated and they are associated with the primary IP on each ENI. When I check the tags on the 2 EIPs that are created, I see the "ip" tag has a value that does not match the private_ip_address it has been associated with - so it looks like the loop is overwriting tags and for some reason not allocating a new EIP.
Issue Type
Bug Report
Component Name
amazon.aws.ec2_eip
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Fedora 40
Steps to Reproduce
With
eni_info
being:the below task returns changed for all items, but only 2 EIPs are ever allocated, and they are associated with the primary IP of each ENI. When I check the tags on the 2 EIPs they do not match the private_ip_address they are associated with.
Expected Results
I expect 6 EIPs to be allocated and associated with primary and secondary private IP addresse. This can be achieved when done manually in the AWS console.
Actual Results
Evidence of only 2 EIPs being created and associated (note the difference in tag IP and the IP assoicated):
Code of Conduct