Bored Monkey
Bored Monkey

Reputation: 11

How to attach EIP to a existing ENI (Created outside of terraform) using terraform

Hello I'm trying to attach EIP to ENI using terraform. Both EIP and ENI are created outside of terraform.

Following are the manual steps:

Is there anyway to automate this using terraform ?

Upvotes: 0

Views: 288

Answers (1)

Bored Monkey
Bored Monkey

Reputation: 11

Found the solution. Looks like terraform natively doesn't support requesting private ip to ENI. So used data external resource to create a secondary ip to existing ENI and used "aws_eip_association" resource to associate EIP to ENI on Private IP created using data external resource.

Upvotes: 1

Related Questions