NetworkInterface

class NetworkInterface : KotlinCustomResource

Manages a Network Interface.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.NetworkInterface;
import com.pulumi.azure.network.NetworkInterfaceArgs;
import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-network")
.addressSpaces("10.0.0.0/16")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("internal")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
.name("example-nic")
.location(example.location())
.resourceGroupName(example.name())
.ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
.name("internal")
.subnetId(exampleSubnet.id())
.privateIpAddressAllocation("Dynamic")
.build())
.build());
}
}

Import

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

$ pulumi import azure:network/networkInterface:NetworkInterface example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1

Properties

Link copied to clipboard

If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set.

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

Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are AcceleratedConnections, Floating, MaxConnections and None.

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

Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are A8, A4, A1, A2 and None.

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

A list of IP Addresses defining the DNS Servers which should be used for this Network Interface.

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

Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created.

Link copied to clipboard

Should Accelerated Networking be enabled? Defaults to false.

Link copied to clipboard

Should IP Forwarding be enabled? Defaults to false.

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

The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network.

Link copied to clipboard

Even if internal_dns_name_label is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internal_domain_name_suffix.

Link copied to clipboard

One or more ip_configuration blocks as defined below.

Link copied to clipboard
val location: Output<String>

The location where the Network Interface should exist. Changing this forces a new resource to be created.

Link copied to clipboard
val macAddress: Output<String>

The Media Access Control (MAC) Address of the Network Interface.

Link copied to clipboard
val name: Output<String>

The name of the Network Interface. Changing this forces a new resource to be created.

Link copied to clipboard

The Static IP Address which should be used.

Link copied to clipboard

The private IP addresses of the network interface.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created.

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

A mapping of tags to assign to the resource.

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

The ID of the Virtual Machine which this Network Interface is connected to.