Network Interface
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
The DNS settings in network interface.
A reference to the dscp configuration to which the network interface is linked.
If the network interface is accelerated networking enabled.
Indicates whether IP forwarding is enabled on this network interface.
The extended location of the network interface.
A list of references to linked BareMetal resources.
A list of IPConfigurations of the network interface.
The MAC address of the network interface.
Migration phase of Network Interface resource.
The reference to the NetworkSecurityGroup resource.
A reference to the private endpoint to which the network interface is linked.
Privatelinkservice of the network interface resource.
The provisioning state of the network interface resource.
The resource GUID property of the network interface resource.
A list of TapConfigurations of the network interface.
The reference to a virtual machine.