» Data Source: azurerm_network_interface

Use this data source to access the properties of an Azure Network Interface.

» Example Usage

data "azurerm_network_interface" "test" {
  name                 = "acctest-nic"
  resource_group_name  = "networking"
}

output "network_interface_id" {
  value = "${data.azurerm_network_interface.test.id}"
}

» Argument Reference

  • name - (Required) Specifies the name of the Network Interface.
  • resource_group_name - (Required) Specifies the name of the resource group the Network Interface is located in.

» Attributes Reference

  • id - The ID of the Network Interface.
  • applied_dns_servers - List of DNS servers applied to the specified Network Interface.
  • enable_accelerated_networking - Indicates if accelerated networking is set on the specified Network Interface.
  • enable_ip_forwarding - Indicate if IP forwarding is set on the specified Network Interface.
  • dns_servers - The list of DNS servers used by the specified Network Interface.
  • internal_dns_name_label - The internal dns name label of the specified Network Interface.
  • internal_fqdn - The internal FQDN associated to the specified Network Interface.
  • ip_configuration - One or more ip_configuration blocks as defined below.
  • location - The location of the specified Network Interface.
  • mac_address - The MAC address used by the specified Network Interface.
  • network_security_group_id - The ID of the network security group associated to the specified Network Interface.
  • private_ip_address - The primary private ip address associated to the specified Network Interface.
  • private_ip_addresses - The list of private ip addresses associates to the specified Network Interface.
  • tags - List the tags associated to the specified Network Interface.
  • virtual_machine_id - The ID of the virtual machine that the specified Network Interface is attached to.

A ip_configuration block contains: