I added count to an aws_instance (e.g. bastionaws1) to allow conditional creation, so I need to terraform import new bastionaws1[0] linked resources and remove old ones (basrionaws1). I correctly imported aws_instance, the instance has attached ENI so I also imported resource network_interface. On terraform plan I get that instance will be replaced becouse network_interface force replacement:
# module.bastionaws1[0].aws_instance.this must be replaced
-/+ resource "aws_instance" "this" {
...
+ network_interface { # forces replacement
+ delete_on_termination = false
+ device_index = 0
+ network_interface_id = "eni-..."
}
how can I import this aws_instance to avoid replacement ?