NetworkInterface

class NetworkInterface : KotlinCustomResource

A network interface in a resource group. API Version: 2020-11-01.

Example Usage

Create network interface

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var networkInterface = new AzureNative.Network.NetworkInterface("networkInterface", new()
{
EnableAcceleratedNetworking = true,
IpConfigurations = new[]
{
new AzureNative.Network.Inputs.NetworkInterfaceIPConfigurationArgs
{
Name = "ipconfig1",
PublicIPAddress = new AzureNative.Network.Inputs.PublicIPAddressArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip",
},
Subnet = new AzureNative.Network.Inputs.SubnetArgs
{
Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default",
},
},
},
Location = "eastus",
NetworkInterfaceName = "test-nic",
ResourceGroupName = "rg1",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewNetworkInterface(ctx, "networkInterface", &network.NetworkInterfaceArgs{
EnableAcceleratedNetworking: pulumi.Bool(true),
IpConfigurations: []network.NetworkInterfaceIPConfigurationArgs{
{
Name: pulumi.String("ipconfig1"),
PublicIPAddress: {
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
},
Subnet: {
Id: pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"),
},
},
},
Location: pulumi.String("eastus"),
NetworkInterfaceName: pulumi.String("test-nic"),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.NetworkInterface;
import com.pulumi.azurenative.network.NetworkInterfaceArgs;
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 networkInterface = new NetworkInterface("networkInterface", NetworkInterfaceArgs.builder()
.enableAcceleratedNetworking(true)
.ipConfigurations(Map.ofEntries(
Map.entry("name", "ipconfig1"),
Map.entry("publicIPAddress", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip")),
Map.entry("subnet", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"))
))
.location("eastus")
.networkInterfaceName("test-nic")
.resourceGroupName("rg1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:NetworkInterface test-nic /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/test-nic

Properties

Link copied to clipboard

The DNS settings in network interface.

Link copied to clipboard

A reference to the dscp configuration to which the network interface is linked.

Link copied to clipboard

If the network interface is accelerated networking enabled.

Link copied to clipboard

Indicates whether IP forwarding is enabled on this network interface.

Link copied to clipboard
val etag: Output<String>

A unique read-only string that changes whenever the resource is updated.

Link copied to clipboard

The extended location of the network interface.

Link copied to clipboard

A list of references to linked BareMetal resources.

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

A list of IPConfigurations of the network interface.

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

Resource location.

Link copied to clipboard
val macAddress: Output<String>

The MAC address of the network interface.

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

Migration phase of Network Interface resource.

Link copied to clipboard
val name: Output<String>

Resource name.

Link copied to clipboard

The reference to the NetworkSecurityGroup resource.

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

Type of Network Interface resource.

Link copied to clipboard
val primary: Output<Boolean>

Whether this is a primary network interface on a virtual machine.

Link copied to clipboard

A reference to the private endpoint to which the network interface is linked.

Link copied to clipboard

Privatelinkservice of the network interface resource.

Link copied to clipboard

The provisioning state of the network interface resource.

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

The resource GUID property of the network interface resource.

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

Resource tags.

Link copied to clipboard

A list of TapConfigurations of the network interface.

Link copied to clipboard
val type: Output<String>

Resource type.

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

The reference to a virtual machine.