Fix: add eni-attachment and migrate additional volumes as map
This MR uses the resource aws_network_interface_attachment
when creating an eni
and its associated EC2 instance. This way any modification on the instance or the ENI does ask terraform to recreate the EC2 instance.
Regarding the EBS additional volumes, we've changed the variable type from list(object)
to map(object)
. This way the management of additional EBs volumes is better as we are working with real map keys, instead of array index which can be dramatic when suppressing one EBS volume in the middle of a long list.