帕克 - 分配特定的弹性IP到实例 [英] Packer - Assign specific Elastic IP to instance

查看:98
本文介绍了帕克 - 分配特定的弹性IP到实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我火了帕克一个EC2实例,以创建AMI,有没有办法给它指定的特殊弹性IP地址,假设我已经拥有了IP地址?

When I fire up an EC2 instance with Packer, in order to create an AMI, is there a way to assign it a specific elastic IP address, assuming I already own that IP address?

推荐答案

我会使用壳牌置备运行一个简单的脚本,与文件置备到您的包装机上载实例。该脚本将利用 AWS CLI 调用副-ip地址此实例。

I would use the Shell Provisioner to run a simple to script, uploaded with the File Provisioner to your Packer instance. The script would utilize the AWS CLI calling associate-ipaddress for this instance.

这篇关于帕克 - 分配特定的弹性IP到实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆