Skip to content

Data Source: azurermNetworkInterface

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

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermNetworkInterfaceExample =
  new azurerm.dataAzurermNetworkInterface.DataAzurermNetworkInterface(
    this,
    "example",
    {
      name: "acctest-nic",
      resource_group_name: "networking",
    }
  );
new cdktf.TerraformOutput(this, "network_interface_id", {
  value: dataAzurermNetworkInterfaceExample.id,
});

Argument Reference

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

Attributes Reference

  • id - The ID of the Network Interface.
  • appliedDnsServers - List of DNS servers applied to the specified Network Interface.
  • enableAcceleratedNetworking - Indicates if accelerated networking is set on the specified Network Interface.
  • enableIpForwarding - Indicate if IP forwarding is set on the specified Network Interface.
  • dnsServers - The list of DNS servers used by the specified Network Interface.
  • internalDnsNameLabel - The internal DNS name label of the specified Network Interface.
  • ipConfiguration - One or more ipConfiguration blocks as defined below.
  • location - The location of the specified Network Interface.
  • macAddress - The MAC address used by the specified Network Interface.
  • networkSecurityGroupId - The ID of the network security group associated to the specified Network Interface.
  • privateIpAddress - The primary private IP address associated to the specified Network Interface.
  • privateIpAddresses - The list of private IP addresses associates to the specified Network Interface.
  • tags - List the tags associated to the specified Network Interface.
  • virtualMachineId - The ID of the virtual machine that the specified Network Interface is attached to.

A ipConfiguration block contains:

  • name - The name of the IP Configuration.
  • subnetId - The ID of the Subnet which the Network Interface is connected to.
  • privateIpAddress - The Private IP Address assigned to this Network Interface.
  • privateIpAddressAllocation - The IP Address allocation type for the Private address, such as dynamic or static.
  • publicIpAddressId - The ID of the Public IP Address which is connected to this Network Interface.
  • applicationGatewayBackendAddressPoolsIds - A list of Backend Address Pool IDs within a Application Gateway that this Network Interface is connected to.
  • loadBalancerBackendAddressPoolsIds - A list of Backend Address Pool IDs within a Load Balancer that this Network Interface is connected to.
  • loadBalancerInboundNatRulesIds - A list of Inbound NAT Rule IDs within a Load Balancer that this Network Interface is connected to.
  • primary - is this the Primary IP Configuration for this Network Interface?
  • gatewayLoadBalancerFrontendIpConfigurationId - The Frontend IP Configuration ID of a Gateway SKU Load Balancer the Network Interface is consuming.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Network Interface.