NetworkInterfaceArgs

data class NetworkInterfaceArgs(val attachments: Output<List<NetworkInterfaceAttachmentArgs>>? = null, val description: Output<String>? = null, val interfaceType: Output<String>? = null, val ipv4PrefixCount: Output<Int>? = null, val ipv4Prefixes: Output<List<String>>? = null, val ipv6AddressCount: Output<Int>? = null, val ipv6AddressListEnabled: Output<Boolean>? = null, val ipv6AddressLists: Output<List<String>>? = null, val ipv6Addresses: Output<List<String>>? = null, val ipv6PrefixCount: Output<Int>? = null, val ipv6Prefixes: Output<List<String>>? = null, val privateIp: Output<String>? = null, val privateIpListEnabled: Output<Boolean>? = null, val privateIpLists: Output<List<String>>? = null, val privateIps: Output<List<String>>? = null, val privateIpsCount: Output<Int>? = null, val securityGroups: Output<List<String>>? = null, val sourceDestCheck: Output<Boolean>? = null, val subnetId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<NetworkInterfaceArgs>

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

Constructors

Link copied to clipboard
constructor(attachments: Output<List<NetworkInterfaceAttachmentArgs>>? = null, description: Output<String>? = null, interfaceType: Output<String>? = null, ipv4PrefixCount: Output<Int>? = null, ipv4Prefixes: Output<List<String>>? = null, ipv6AddressCount: Output<Int>? = null, ipv6AddressListEnabled: Output<Boolean>? = null, ipv6AddressLists: Output<List<String>>? = null, ipv6Addresses: Output<List<String>>? = null, ipv6PrefixCount: Output<Int>? = null, ipv6Prefixes: Output<List<String>>? = null, privateIp: Output<String>? = null, privateIpListEnabled: Output<Boolean>? = null, privateIpLists: Output<List<String>>? = null, privateIps: Output<List<String>>? = null, privateIpsCount: Output<Int>? = null, securityGroups: Output<List<String>>? = null, sourceDestCheck: Output<Boolean>? = null, subnetId: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

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>? = null

Description for the network interface.

Link copied to clipboard
val interfaceType: Output<String>? = null

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>? = null

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

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

One or more IPv4 prefixes assigned to the network interface.

Link copied to clipboard
val ipv6AddressCount: Output<Int>? = null

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>>? = null

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
val ipv6AddressListEnabled: Output<Boolean>? = null

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
val ipv6AddressLists: Output<List<String>>? = null

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

Link copied to clipboard
val ipv6PrefixCount: Output<Int>? = null

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

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

One or more IPv6 prefixes assigned to the network interface.

Link copied to clipboard
val privateIp: Output<String>? = null
Link copied to clipboard
val privateIpListEnabled: Output<Boolean>? = null

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>>? = null

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>>? = null

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

Link copied to clipboard
val privateIpsCount: Output<Int>? = null

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 securityGroups: Output<List<String>>? = null

List of security group IDs to assign to the ENI.

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

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

Link copied to clipboard
val subnetId: Output<String>? = null

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

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

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.

Functions

Link copied to clipboard
open override fun toJava(): NetworkInterfaceArgs