github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/providers/azurerm/r/network_interface.html.markdown (about) 1 --- 2 layout: "azurerm" 3 page_title: "Azure Resource Manager: azure_network_interface" 4 sidebar_current: "docs-azurerm-resource-network-interface" 5 description: |- 6 Manages the Network Interface cards that link the Virtual Machines and Virtual Network. 7 --- 8 9 # azurerm\_network\_interface 10 11 Network interface cards are virtual network cards that form the link between virtual machines and the virtual network 12 13 ## Example Usage 14 15 ``` 16 resource "azurerm_resource_group" "test" { 17 name = "acceptanceTestResourceGroup1" 18 location = "West US" 19 } 20 21 resource "azurerm_virtual_network" "test" { 22 name = "acceptanceTestVirtualNetwork1" 23 address_space = ["10.0.0.0/16"] 24 location = "West US" 25 resource_group_name = "${azurerm_resource_group.test.name}" 26 } 27 28 resource "azurerm_subnet" "test" { 29 name = "testsubnet" 30 resource_group_name = "${azurerm_resource_group.test.name}" 31 virtual_network_name = "${azurerm_virtual_network.test.name}" 32 address_prefix = "10.0.2.0/24" 33 } 34 35 resource "azurerm_network_interface" "test" { 36 name = "acceptanceTestNetworkInterface1" 37 location = "West US" 38 resource_group_name = "${azurerm_resource_group.test.name}" 39 40 ip_configuration { 41 name = "testconfiguration1" 42 subnet_id = "${azurerm_subnet.test.id}" 43 private_ip_address_allocation = "dynamic" 44 } 45 46 tags { 47 environment = "staging" 48 } 49 } 50 ``` 51 52 ## Argument Reference 53 54 The following arguments are supported: 55 56 * `name` - (Required) The name of the network interface. Changing this forces a 57 new resource to be created. 58 59 * `resource_group_name` - (Required) The name of the resource group in which to 60 create the network interface. 61 62 * `location` - (Required) The location/region where the network interface is 63 created. Changing this forces a new resource to be created. 64 65 * `network_security_group_id` - (Optional) The ID of the Network Security Group to associate with 66 the network interface. 67 68 * `internal_dns_name_label` - (Optional) Relative DNS name for this NIC used for internal communications between VMs in the same VNet 69 70 * `enable_ip_forwarding` - (Optional) Enables IP Forwarding on the NIC. Defaults to `false`. 71 72 * `dns_servers` - (Optional) List of DNS servers IP addresses to use for this NIC, overrides the VNet-level server list 73 74 * `ip_configuration` - (Optional) Collection of ipConfigurations associated with this NIC. Each `ip_configuration` block supports fields documented below. 75 76 * `tags` - (Optional) A mapping of tags to assign to the resource. 77 78 The `ip_configuration` block supports: 79 80 * `name` - (Required) User-defined name of the IP. 81 82 * `subnet_id` - (Required) Reference to a subnet in which this NIC has been created. 83 84 * `private_ip_address` - (Optional) Static IP Address. 85 86 * `private_ip_address_allocation` - (Required) Defines how a private IP address is assigned. Options are Static or Dynamic. 87 88 * `public_ip_address_id` - (Optional) Reference to a Public IP Address to associate with this NIC 89 90 * `load_balancer_backend_address_pools_ids` - (Optional) List of Load Balancer Backend Address Pool IDs references to which this NIC belongs 91 92 * `load_balancer_inbound_nat_rules_ids` - (Optional) List of Load Balancer Inbound Nat Rules IDs involving this NIC 93 94 ## Attributes Reference 95 96 The following attributes are exported: 97 98 * `id` - The virtual NetworkConfiguration ID. 99 * `mac_address` - The media access control (MAC) address of the network interface. 100 * `private_ip_address` - The private ip address of the network interface. 101 * `virtual_machine_id` - Reference to a VM with which this NIC has been associated. 102 * `applied_dns_servers` - If the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set 103 * `internal_fqdn` - Fully qualified DNS name supporting internal communications between VMs in the same VNet