>  Seems like it's not possible.

No, it's not possible after the instance has already been created.

Why do you need it as eth0?


A requirement of some software that we're using (quite draconian, but a
requirement nonetheless).

I've modified the packer source and got it to work by adding my own
'network_interface' option, but 'there be dragons' since you can no longer
define a subnet and security group and there could be other complications.
I would try to submit a PR, but I think that this is such an edge case that
it's most likely not worth the maintenance burden for the few people who
would need it.  I think my best option is to pursue a custom builder plugin.

On Mon, Jul 1, 2019 at 2:34 AM Rickard von Essen <
[email protected]> wrote:

> Every instance in a VPC has a default network interface, called the
>> primary network interface (eth0). You cannot detach a primary network
>> interface from an instance.
>
>
> https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#eni-basics
>
>  Seems like it's not possible.
>
> Why do you need it as eth0?
>
> On Mon, Jul 1, 2019 at 5:44 AM Rob Capellini <[email protected]>
> wrote:
>
>> Is it possible to attach an existing elastic network interface (ENI) to
>> an instance when using any of the amazon builders?  I need eth0 to have the
>> specific MAC address of the ENI.  I have a pre-provisioned ENI available
>> and need to attach it to the instance at device index 0.  I have tried to
>> script this using shell scripts, but unfortunately it seems you can't
>> replace eth0 after the instance has been stood up.  Is there a way to do
>> this that I am missing?
>>
>> --
>> 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/9ee1ea4a-6656-4f33-8419-084d964e5c2b%40googlegroups.com
>> <https://groups.google.com/d/msgid/packer-tool/9ee1ea4a-6656-4f33-8419-084d964e5c2b%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 a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/PZbQvADzCw8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CALz9Rt-S5fnJ1BaeE%3DSqsxEFQ-soLAthW1KVEzanmfgfyG7MZQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt-S5fnJ1BaeE%3DSqsxEFQ-soLAthW1KVEzanmfgfyG7MZQ%40mail.gmail.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/CAMy%2BZrgZP78wfwyxykBt7RVcTaVSwwVSkoQBVy%2Bh0woHQ7fVOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to