» aws_network_interface

Use this data source to get information about a Network Interface.

» Example Usage

data "aws_network_interface" "bar" {
  id = "eni-01234567"
}

» Argument Reference

The following arguments are supported:

  • id – (Optional) The 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.

» Attributes Reference

See the Network Interface for details on the returned attributes.

Additionally, the following attributes are exported:

  • association - The association information for an Elastic IP address (IPv4) associated with the network interface. See supported fields below.
  • availability_zone - The Availability Zone.
  • interface_type - The type of interface.
  • ipv6_addresses - List of IPv6 addresses to assign to the ENI.
  • mac_address - The MAC address.
  • owner_id - The AWS account ID of the owner of the network interface.
  • requester_id - The ID of the entity that launched the instance on your behalf.

» association

» Import

Elastic Network Interfaces can be imported using the id, e.g.

$ terraform import aws_network_interface.test eni-12345