When I create an instance or an LB it automatically creates an eni network interface for it behind the scenes.
Is there a way to get at that to tag it?
I see that for aws_instances with EBS volumes there’s a “volume_tags” option to propagate the tags but I don’t see anything for network interfaces.
I suppose I could get artistic and create a dummy resource with a provisioner which executes an AWS CLI call against the resource’s “primary_network_interface_id” output, but that seems a bit of a stretch…
In my case I have 3 instance which I am creating using count so in aws_ec2_tag I am using count to get resource_id for each resources. when I use for_each for tagging those 3 instances ENI I am getting error say that The "count" and "for_each" meta-arguments are mutually-exclusive, only one should be used to be explicit about the number of resources to be created. . How can I tackle this problem?.