There isn't direct support i Packer, in #578 there is a note "Note, this
only adds support for AssociatePublicIpAddress, not Elastic IPs.". See
https://github.com/hashicorp/packer/issues/578#issuecomment-29267092

But this can still be done. You give the ec2 instance packer launches an
Instance Role that allow it to associate the EIP with it and use a user
script (cloud-init) to associate it with the EIP. Also in you packer
template you have to use ssh_host to set the IP address of the EIP, see
https://www.packer.io/docs/templates/communicator.html#ssh_host

Hope that was clear enough. Please get back if you have any trouble get
this working.

On 19 March 2018 at 23:33, Frank.Lapierre <[email protected]> wrote:

> Hi All,
>
> I was trying to figure out if it's possible to associate an existing
> elastic IP address to a packer build?
> I have an on-prem server that initiates packer builds and I have a limited
> number of elastic IPs that are accessible through the corporate firewall. I
> don't want to have to set up a VPN connection to access through the private
> IP. I also can't use a public_ip_address because they're randomly assigned
> and change all the time. https://www.packer.io/docs/
> builders/amazon-ebs.html#associate_public_ip_address
>
> Anyone knows if it's possible to associate an existing elastic IP? Maybe
> I'm just not seeing the option... I found this that seems to state it's
> already implemented? https://github.com/hashicorp/packer/issues/578
>
> Thanks!
>
> Frank.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/46168fd7-6b1a-4681-a99e-1a9b33d0fa5e%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/46168fd7-6b1a-4681-a99e-1a9b33d0fa5e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt_p%2ByDKCt2%3D9qY%2BfpoduOb2NOXJXXqrgM1b7EFxYSbAHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to