[英]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.您好,我正在尝试使用 terraform 将 EIP 附加到 ENI。EIP 和 ENI 都是在 terraform 之外创建的。
Following are the manual steps:以下是手动步骤:
Is there anyway to automate this using terraform?有没有办法使用 terraform 自动执行此操作?
Found the solution.找到了解决方案。 Looks like terraform natively doesn't support requesting private ip to ENI.
看起来 terraform 本机不支持向 ENI 请求私有 ip。 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.
因此,使用数据外部资源为现有 ENI 创建辅助 ip,并使用“ aws_eip_association ”资源将 EIP 关联到使用数据外部资源创建的私有 IP 上的 ENI。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.