Use this data source to get information about a Network Interface.
data "aws_network_interface" "bar" {
id = "eni-01234567"
}
This data source supports the following arguments:
id
– (Optional) Identifier for the network interface.filter
– (Optional) One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out describe-network-interfaces in the AWS CLI reference.See the Network Interface for details on the returned attributes.
Additionally, the following attributes are exported:
arn
- ARN of the network interface.association
- Association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.availability_zone
- Availability Zone.description
- Description of the network interface.interface_type
- Type of interface.ipv6_addresses
- List of IPv6 addresses to assign to the ENI.mac_address
- MAC address.owner_id
- AWS account ID of the owner of the network interface.private_dns_name
- Private DNS name.private_ip
- Private IPv4 address of the network interface within the subnet.private_ips
- Private IPv4 addresses associated with the network interface.requester_id
- ID of the entity that launched the instance on your behalf.security_groups
- List of security groups for the network interface.subnet_id
- ID of the subnet.outpost_arn
- ARN of the Outpost.tags
- Any tags assigned to the network interface.vpc_id
- ID of the VPC.association
allocation_id
- Allocation ID.association_id
- Association ID.carrier_ip
- Carrier IP address associated with the network interface. This attribute is only set when the network interface is in a subnet which is associated with a Wavelength Zone.customer_owned_ip
- Customer-owned IP address.ip_owner_id
- ID of the Elastic IP address owner.public_dns_name
- Public DNS name.public_ip
- Address of the Elastic IP address bound to the network interface.read
- (Default 20m
)