Network Interface
Provides an Elastic network interface (ENI) resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.NetworkInterface;
import com.pulumi.aws.ec2.NetworkInterfaceArgs;
import com.pulumi.aws.ec2.inputs.NetworkInterfaceAttachmentArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new NetworkInterface("test", NetworkInterfaceArgs.builder()
.subnetId(aws_subnet.public_a().id())
.privateIps("10.0.0.50")
.securityGroups(aws_security_group.web().id())
.attachments(NetworkInterfaceAttachmentArgs.builder()
.instance(aws_instance.test().id())
.deviceIndex(1)
.build())
.build());
}
}
Import
Network Interfaces can be imported using the id
, e.g.,
$ pulumi import aws:ec2/networkInterface:NetworkInterface test eni-e5aa89a3
Properties
Configuration block to define the attachment of the ENI. See Attachment below for more details!
Description for the network interface.
Type of network interface to create. Set to efa
for Elastic Fabric Adapter. Changing interface_type
will cause the resource to be destroyed and re-created.
Number of IPv4 prefixes that AWS automatically assigns to the network interface.
One or more IPv4 prefixes assigned to the network interface.
Number of IPv6 addresses to assign to a network interface. You can't use this option if specifying specific ipv6_addresses
. If your subnet has the AssignIpv6AddressOnCreation attribute set to true
, you can specify 0
to override this setting.
One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. Addresses are assigned without regard to order. You can't use this option if you're specifying ipv6_address_count
.
Whether ipv6_address_list
is allowed and controls the IPs to assign to the ENI and ipv6_addresses
and ipv6_address_count
become read-only. Default false.
List of private IPs to assign to the ENI in sequential order.
Number of IPv6 prefixes that AWS automatically assigns to the network interface.
One or more IPv6 prefixes assigned to the network interface.
MAC address of the network interface.
Private DNS name of the network interface (IPv4).
Whether private_ip_list
is allowed and controls the IPs to assign to the ENI and private_ips
and private_ips_count
become read-only. Default false.
List of private IPs to assign to the ENI in sequential order. Requires setting private_ip_list_enabled
to true
.
List of private IPs to assign to the ENI without regard to order.
Number of secondary private IPs to assign to the ENI. The total number of private IPs will be 1 + private_ips_count
, as a primary private IP will be assiged to an ENI by default.
List of security group IDs to assign to the ENI.
Whether to enable source destination checking for the ENI. Default true.