GetNetworkInterface

Use this data source to access information about an existing Network Interface.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Network.GetNetworkInterface.InvokeAsync(new Azure.Network.GetNetworkInterfaceArgs
        {
            Name = "acctest-nic",
            ResourceGroupName = "networking",
        }));
        this.NetworkInterfaceId = example.Apply(example => example.Id);
    }

    [Output("networkInterfaceId")]
    public Output<string> NetworkInterfaceId { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := network.LookupNetworkInterface(ctx, &network.LookupNetworkInterfaceArgs{
            Name:              "acctest-nic",
            ResourceGroupName: "networking",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("networkInterfaceId", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_network_interface(name="acctest-nic",
    resource_group_name="networking")
pulumi.export("networkInterfaceId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getNetworkInterface({
    name: "acctest-nic",
    resourceGroupName: "networking",
});
export const networkInterfaceId = example.then(example => example.id);

Using GetNetworkInterface

function getNetworkInterface(args: GetNetworkInterfaceArgs, opts?: InvokeOptions): Promise<GetNetworkInterfaceResult>
function  get_network_interface(name=None, resource_group_name=None, opts=None)
func LookupNetworkInterface(ctx *Context, args *LookupNetworkInterfaceArgs, opts ...InvokeOption) (*LookupNetworkInterfaceResult, error)

Note: This function is named LookupNetworkInterface in the Go SDK.

public static class GetNetworkInterface {
    public static Task<GetNetworkInterfaceResult> InvokeAsync(GetNetworkInterfaceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the name of the Network Interface.

ResourceGroupName string

Specifies the name of the resource group the Network Interface is located in.

Name string

Specifies the name of the Network Interface.

ResourceGroupName string

Specifies the name of the resource group the Network Interface is located in.

name string

Specifies the name of the Network Interface.

resourceGroupName string

Specifies the name of the resource group the Network Interface is located in.

name str

Specifies the name of the Network Interface.

resource_group_name str

Specifies the name of the resource group the Network Interface is located in.

GetNetworkInterface Result

The following output properties are available:

AppliedDnsServers List<string>

List of DNS servers applied to the specified Network Interface.

DnsServers List<string>

The list of DNS servers used by the specified Network Interface.

EnableAcceleratedNetworking bool

Indicates if accelerated networking is set on the specified Network Interface.

EnableIpForwarding bool

Indicate if IP forwarding is set on the specified Network Interface.

Id string

The provider-assigned unique ID for this managed resource.

InternalDnsNameLabel string

The internal dns name label of the specified Network Interface.

IpConfigurations List<GetNetworkInterfaceIpConfiguration>

One or more ip_configuration blocks as defined below.

Location string

The location of the specified Network Interface.

MacAddress string

The MAC address used by the specified Network Interface.

Name string

The name of the IP Configuration.

NetworkSecurityGroupId string

The ID of the network security group associated to the specified Network Interface.

PrivateIpAddress string

The Private IP Address assigned to this Network Interface.

PrivateIpAddresses List<string>

The list of private ip addresses associates to the specified Network Interface.

ResourceGroupName string
Tags Dictionary<string, string>

List the tags associated to the specified Network Interface.

VirtualMachineId string

The ID of the virtual machine that the specified Network Interface is attached to.

AppliedDnsServers []string

List of DNS servers applied to the specified Network Interface.

DnsServers []string

The list of DNS servers used by the specified Network Interface.

EnableAcceleratedNetworking bool

Indicates if accelerated networking is set on the specified Network Interface.

EnableIpForwarding bool

Indicate if IP forwarding is set on the specified Network Interface.

Id string

The provider-assigned unique ID for this managed resource.

InternalDnsNameLabel string

The internal dns name label of the specified Network Interface.

IpConfigurations []GetNetworkInterfaceIpConfiguration

One or more ip_configuration blocks as defined below.

Location string

The location of the specified Network Interface.

MacAddress string

The MAC address used by the specified Network Interface.

Name string

The name of the IP Configuration.

NetworkSecurityGroupId string

The ID of the network security group associated to the specified Network Interface.

PrivateIpAddress string

The Private IP Address assigned to this Network Interface.

PrivateIpAddresses []string

The list of private ip addresses associates to the specified Network Interface.

ResourceGroupName string
Tags map[string]string

List the tags associated to the specified Network Interface.

VirtualMachineId string

The ID of the virtual machine that the specified Network Interface is attached to.

appliedDnsServers string[]

List of DNS servers applied to the specified Network Interface.

dnsServers string[]

The list of DNS servers used by the specified Network Interface.

enableAcceleratedNetworking boolean

Indicates if accelerated networking is set on the specified Network Interface.

enableIpForwarding boolean

Indicate if IP forwarding is set on the specified Network Interface.

id string

The provider-assigned unique ID for this managed resource.

internalDnsNameLabel string

The internal dns name label of the specified Network Interface.

ipConfigurations GetNetworkInterfaceIpConfiguration[]

One or more ip_configuration blocks as defined below.

location string

The location of the specified Network Interface.

macAddress string

The MAC address used by the specified Network Interface.

name string

The name of the IP Configuration.

networkSecurityGroupId string

The ID of the network security group associated to the specified Network Interface.

privateIpAddress string

The Private IP Address assigned to this Network Interface.

privateIpAddresses string[]

The list of private ip addresses associates to the specified Network Interface.

resourceGroupName string
tags {[key: string]: string}

List the tags associated to the specified Network Interface.

virtualMachineId string

The ID of the virtual machine that the specified Network Interface is attached to.

applied_dns_servers List[str]

List of DNS servers applied to the specified Network Interface.

dns_servers List[str]

The list of DNS servers used by the specified Network Interface.

enable_accelerated_networking bool

Indicates if accelerated networking is set on the specified Network Interface.

enable_ip_forwarding bool

Indicate if IP forwarding is set on the specified Network Interface.

id str

The provider-assigned unique ID for this managed resource.

internal_dns_name_label str

The internal dns name label of the specified Network Interface.

ip_configurations List[GetNetworkInterfaceIpConfiguration]

One or more ip_configuration blocks as defined below.

location str

The location of the specified Network Interface.

mac_address str

The MAC address used by the specified Network Interface.

name str

The name of the IP Configuration.

network_security_group_id str

The ID of the network security group associated to the specified Network Interface.

private_ip_address str

The Private IP Address assigned to this Network Interface.

private_ip_addresses List[str]

The list of private ip addresses associates to the specified Network Interface.

resource_group_name str
tags Dict[str, str]

List the tags associated to the specified Network Interface.

virtual_machine_id str

The ID of the virtual machine that the specified Network Interface is attached to.

Supporting Types

GetNetworkInterfaceIpConfiguration

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ApplicationGatewayBackendAddressPoolsIds List<string>

A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.

ApplicationSecurityGroupIds List<string>
LoadBalancerBackendAddressPoolsIds List<string>

A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.

LoadBalancerInboundNatRulesIds List<string>

A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.

Name string

Specifies the name of the Network Interface.

Primary bool

is this the Primary IP Configuration for this Network Interface?

PrivateIpAddress string

The Private IP Address assigned to this Network Interface.

PrivateIpAddressAllocation string

The IP Address allocation type for the Private address, such as Dynamic or Static.

PrivateIpAddressVersion string
PublicIpAddressId string

The ID of the Public IP Address which is connected to this Network Interface.

SubnetId string

The ID of the Subnet which the Network Interface is connected to.

ApplicationGatewayBackendAddressPoolsIds []string

A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.

ApplicationSecurityGroupIds []string
LoadBalancerBackendAddressPoolsIds []string

A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.

LoadBalancerInboundNatRulesIds []string

A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.

Name string

Specifies the name of the Network Interface.

Primary bool

is this the Primary IP Configuration for this Network Interface?

PrivateIpAddress string

The Private IP Address assigned to this Network Interface.

PrivateIpAddressAllocation string

The IP Address allocation type for the Private address, such as Dynamic or Static.

PrivateIpAddressVersion string
PublicIpAddressId string

The ID of the Public IP Address which is connected to this Network Interface.

SubnetId string

The ID of the Subnet which the Network Interface is connected to.

applicationGatewayBackendAddressPoolsIds string[]

A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.

applicationSecurityGroupIds string[]
loadBalancerBackendAddressPoolsIds string[]

A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.

loadBalancerInboundNatRulesIds string[]

A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.

name string

Specifies the name of the Network Interface.

primary boolean

is this the Primary IP Configuration for this Network Interface?

privateIpAddress string

The Private IP Address assigned to this Network Interface.

privateIpAddressAllocation string

The IP Address allocation type for the Private address, such as Dynamic or Static.

privateIpAddressVersion string
publicIpAddressId string

The ID of the Public IP Address which is connected to this Network Interface.

subnetId string

The ID of the Subnet which the Network Interface is connected to.

applicationGatewayBackendAddressPoolsIds List[str]

A list of Backend Address Pool ID’s within a Application Gateway that this Network Interface is connected to.

applicationSecurityGroupIds List[str]
loadBalancerBackendAddressPoolsIds List[str]

A list of Backend Address Pool ID’s within a Load Balancer that this Network Interface is connected to.

loadBalancerInboundNatRulesIds List[str]

A list of Inbound NAT Rule ID’s within a Load Balancer that this Network Interface is connected to.

name str

Specifies the name of the Network Interface.

primary bool

is this the Primary IP Configuration for this Network Interface?

privateIpAddressAllocation str

The IP Address allocation type for the Private address, such as Dynamic or Static.

privateIpAddressVersion str
private_ip_address str

The Private IP Address assigned to this Network Interface.

public_ip_address_id str

The ID of the Public IP Address which is connected to this Network Interface.

subnet_id str

The ID of the Subnet which the Network Interface is connected to.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.