The following arguments are supported:
Note:
Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network.
Note:
Only certain Virtual Machine sizes are supported for Accelerated Networking - more information can be found in this document.
Note:
To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster.
The ip_configuration block supports the following:
Note:
This is required when private_ip_address_version is set to IPv4.
Note:
Dynamic means "An IP is automatically assigned during creation of this Network Interface"; Static means "User supplied IP address will be used"
When private_ip_address_allocation is set to Static the following fields can be configured:
When private_ip_address_version is set to IPv4 the following fields can be configured:
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_virtual_network" "example" {
name = "example-network"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
}
resource "azurerm_subnet" "example" {
name = "internal"
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.0.2.0/24"]
}
resource "azurerm_network_interface" "example" {
name = "example-nic"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
ip_configuration {
name = "internal"
subnet_id = azurerm_subnet.example.id
private_ip_address_allocation = "Dynamic"
}
}
az network nic create --name
--resource-group
--subnet
[--accelerated-networking {0, 1, f, false, n, no, t, true, y, yes}]
[--ag-address-pools]
[--application-security-groups]
[--dns-servers]
[--edge-zone]
[--gateway-name]
[--internal-dns-name]
[--ip-forwarding {0, 1, f, false, n, no, t, true, y, yes}]
[--lb-address-pools]
[--lb-inbound-nat-rules]
[--lb-name]
[--location]
[--network-security-group]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--private-ip-address]
[--private-ip-address-version {IPv4, IPv6}]
[--public-ip-address]
[--tags]
[--vnet-name]
az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic
Categorized by Availability, Security & Compliance and Cost