f5devcentral / terraform-aws-bigip-module

This Repo has been Archived, and moved to: https://github.com/F5Networks/terraform-aws-bigip-module for Supported Module
3 stars 8 forks source link

3-nic EIP Assignment Issue #23

Closed codygreen closed 3 years ago

codygreen commented 3 years ago

The 3-nic example is assigning the EIP for the public subnet to the public Self-IP. However, port lockdown for that SIP is set to None and will not serve application traffic. Note: this probably affects all multi-nic examples as well.

The EIP should be assigned to the 2nd internal IP address associated with the public NIC - best practice

codygreen commented 3 years ago

After further evaluation, this is an issue with the module and not the example code.

codygreen commented 3 years ago

I'm having to perform the following steps to work around this:

export vip_private_address=`terraform output -json | jq '.private_addresses.value[0][0][0]' -r`
export vip_instance_id=`aws ec2 describe-instances | jq '.Reservations[0].Instances[0].InstanceId' -r`
export vip_eni=`aws ec2 describe-instances | jq '.Reservations[0].Instances[0].NetworkInterfaces[] | select(.PrivateIpAddress | contains("10.0.2.")) | .NetworkInterfaceId' -r`
export allocation_id=`aws ec2 describe-addresses | jq '.Addresses[] | select(.NetworkInterfaceId | contains($vip_eni)) | .AllocationId' --arg vip_eni "$vip_eni" -r`
aws ec2 associate-address --allocation-id $allocation_id --network-interface-id $vip_eni --private-ip-address $vip_private_address
papineni87 commented 3 years ago

Tracking through INFRAANO-215

RavinderReddyF5 commented 3 years ago

@codygreen added changes to assigning eip to secondary private ip of external public enabled interface.(only first external interface)

RavinderReddyF5 commented 3 years ago

fixed in v0.9.3