NetworkInterface

class NetworkInterface : KotlinCustomResource

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

Link copied to clipboard
val arn: Output<String>

ARN of the network interface.

Link copied to clipboard

Configuration block to define the attachment of the ENI. See Attachment below for more details!

Link copied to clipboard
val description: Output<String>?

Description for the network interface.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val interfaceType: Output<String>

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.

Link copied to clipboard
val ipv4PrefixCount: Output<Int>

Number of IPv4 prefixes that AWS automatically assigns to the network interface.

Link copied to clipboard
val ipv4Prefixes: Output<List<String>>

One or more IPv4 prefixes assigned to the network interface.

Link copied to clipboard
val ipv6AddressCount: Output<Int>

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.

Link copied to clipboard
val ipv6Addresses: Output<List<String>>

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.

Link copied to clipboard

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.

Link copied to clipboard

List of private IPs to assign to the ENI in sequential order.

Link copied to clipboard
val ipv6PrefixCount: Output<Int>

Number of IPv6 prefixes that AWS automatically assigns to the network interface.

Link copied to clipboard
val ipv6Prefixes: Output<List<String>>

One or more IPv6 prefixes assigned to the network interface.

Link copied to clipboard
val macAddress: Output<String>

MAC address of the network interface.

Link copied to clipboard
val outpostArn: Output<String>
Link copied to clipboard
val ownerId: Output<String>

AWS account ID of the owner of the network interface.

Link copied to clipboard
val privateDnsName: Output<String>

Private DNS name of the network interface (IPv4).

Link copied to clipboard
val privateIp: Output<String>
Link copied to clipboard

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.

Link copied to clipboard
val privateIpLists: Output<List<String>>

List of private IPs to assign to the ENI in sequential order. Requires setting private_ip_list_enabled to true.

Link copied to clipboard
val privateIps: Output<List<String>>

List of private IPs to assign to the ENI without regard to order.

Link copied to clipboard
val privateIpsCount: Output<Int>

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.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val securityGroups: Output<List<String>>

List of security group IDs to assign to the ENI.

Link copied to clipboard
val sourceDestCheck: Output<Boolean>?

Whether to enable source destination checking for the ENI. Default true.

Link copied to clipboard
val subnetId: Output<String>

Subnet ID to create the ENI in. The following arguments are optional:

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>