Hello all, I have recently tried to az network vent update --dns-servers a vnet that was using the default Azure DNS Servers. Upon doing so, the following stacktrace appears:
Dir: /home/tj/git/Movere.Dev.Builder [master]
Usr: tj - Tue 24, 1:10PM > az network vnet update --name mov-dev-we-vnet --resource-group movere-dev-we --dns-servers 172.17.32.4 8.8.8.8
'NoneType' object has no attribute 'dns_servers'
Traceback (most recent call last):
File "/usr/bin/azure-cli/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "/usr/bin/azure-cli/lib/python3.6/site-packages/azure/cli/core/application.py", line 212, in execute
result = expanded_arg.func(params)
File "/usr/bin/azure-cli/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 377, in __call__
return self.handler(*args, **kwargs)
File "/usr/bin/azure-cli/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 450, in handler
raise ex
File "/usr/bin/azure-cli/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 405, in handler
instance = custom_function(instance, **custom_func_args)
File "/usr/bin/azure-cli/lib/python3.6/site-packages/azure/cli/command_modules/network/custom.py", line 1672, in update_vnet
instance.dhcp_options.dns_servers = dns_servers
AttributeError: 'NoneType' object has no attribute 'dns_servers'
However, executing that command once you have set any arbitrary custom DNS server from the portal will succeed. This seems like a bug, but may not be based on the verb az network UPDATE. But I'm not sure.
If this is not the supported method to specify a DNS server for a vnet from the command line for the first time, please advise on how this should correctly be done.
I cannot reproduce this. I suspect you have an out-of-date version of the CLI. Please run az --version
@tjprescott
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Wed 25, 9:37AM > az --version
azure-cli (2.0.18)
acr (2.0.12)
acs (2.0.16)
appservice (0.1.17)
backup (1.0.1)
batch (3.1.4)
billing (0.1.5)
cdn (0.0.9)
cloud (2.0.8)
cognitiveservices (0.1.8)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.11)
consumption (0.1.5)
container (0.1.11)
core (2.0.17)
cosmosdb (0.1.13)
dla (0.0.12)
dls (0.0.14)
eventgrid (0.1.4)
extension (0.0.3)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.10)
iot (0.1.12)
keyvault (2.0.11)
lab (0.0.11)
monitor (0.0.10)
network (2.0.15)
nspkg (3.0.1)
profile (2.0.13)
rdbms (0.0.7)
redis (0.2.9)
resource (2.0.15)
role (2.0.12)
servicefabric (0.0.4)
sql (2.0.12)
storage (2.0.16)
vm (2.0.15)
Python location '/usr/bin/azure-cli/bin/python'
Extensions directory '/home/tj/.azure/cliextensions'
Python (Linux) 3.6.2 (default, Jul 20 2017, 03:52:27)
[GCC 7.1.1 20170630]
Legal docs and information: aka.ms/AzureCliLegal
I can compile the newest commit to Master if you wish.
Please update to 2.0.21 and see if that corrects your issue. How did you originally create the VNET?
Hello @tjprescott I apologize for the delay in my response. The end of last week was a little busy.
I have upgraded to azure-cli (2.0.21.dev8964). Unfortunately the issue still persists. Here are some command outputs that may help illustrate the issue. (bug?)
acs-engine version
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:57AM > az --version | head -n 1
azure-cli (2.0.21.dev8964)
Attempting to update DNS servers BEFORE manually setting them in the Portal. Specifying TWO DNS servers
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:56AM > az network vnet update --name dev-eu2-vnet --resource-group dev-eu2 --dns-servers 172.16.32.4 8.8.8.8
'NoneType' object has no attribute 'dns_servers'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "/usr/lib/python3.6/site-packages/azure/cli/core/application.py", line 212, in execute
result = expanded_arg.func(params)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 377, in __call__
return self.handler(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 341, in handler
raise ex
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 296, in handler
instance = custom_function(instance, **custom_func_args)
File "/usr/lib/python3.6/site-packages/azure/cli/command_modules/network/custom.py", line 1674, in update_vnet
instance.dhcp_options.dns_servers = dns_servers
AttributeError: 'NoneType' object has no attribute 'dns_servers'
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:57AM > az network vnet update --name dev-we-vnet --resource-group dev-we --dns-servers 172.17.32.4 8.8.8.8
'NoneType' object has no attribute 'dns_servers'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "/usr/lib/python3.6/site-packages/azure/cli/core/application.py", line 212, in execute
result = expanded_arg.func(params)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 377, in __call__
return self.handler(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 341, in handler
raise ex
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 296, in handler
instance = custom_function(instance, **custom_func_args)
File "/usr/lib/python3.6/site-packages/azure/cli/command_modules/network/custom.py", line 1674, in update_vnet
instance.dhcp_options.dns_servers = dns_servers
AttributeError: 'NoneType' object has no attribute 'dns_servers'
Attempting to update DNS servers BEFORE manually setting them in the Portal. Specifying ONE DNS servers
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:57AM > az network vnet update --name dev-eu2-vnet --resource-group dev-eu2 --dns-servers 172.16.32.4
'NoneType' object has no attribute 'dns_servers'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "/usr/lib/python3.6/site-packages/azure/cli/core/application.py", line 212, in execute
result = expanded_arg.func(params)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 377, in __call__
return self.handler(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 341, in handler
raise ex
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 296, in handler
instance = custom_function(instance, **custom_func_args)
File "/usr/lib/python3.6/site-packages/azure/cli/command_modules/network/custom.py", line 1674, in update_vnet
instance.dhcp_options.dns_servers = dns_servers
AttributeError: 'NoneType' object has no attribute 'dns_servers'
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:57AM > az network vnet update --name dev-we-vnet --resource-group dev-we --dns-servers 172.17.32.4
'NoneType' object has no attribute 'dns_servers'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
cmd_result = APPLICATION.execute(args)
File "/usr/lib/python3.6/site-packages/azure/cli/core/application.py", line 212, in execute
result = expanded_arg.func(params)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 377, in __call__
return self.handler(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 341, in handler
raise ex
File "/usr/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 296, in handler
instance = custom_function(instance, **custom_func_args)
File "/usr/lib/python3.6/site-packages/azure/cli/command_modules/network/custom.py", line 1674, in update_vnet
instance.dhcp_options.dns_servers = dns_servers
AttributeError: 'NoneType' object has no attribute 'dns_servers'
Successfully updating DNS servers AFTER manually setting them in the Portal. Specifying ONE server
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:57AM > az network vnet update --name dev-eu2-vnet --resource-group dev-eu2 --dns-servers 172.16.32.4
{
"addressSpace": {
"addressPrefixes": [
"172.16.32.0/19"
]
},
"dhcpOptions": {
"dnsServers": [
"172.16.32.4"
]
},
"enableDdosProtection": false,
"enableVmProtection": false,
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet",
"location": "eastus2",
"name": "dev-eu2-vnet",
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceGuid": "REDACTED",
"subnets": [
{
"addressPrefix": "172.16.32.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-dc-subnet",
"ipConfigurations": [
{
"etag": null,
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/networkInterfaces/dev-eu2-dcVMNic/ipConfigurations/ipconfigdev-eu2-dc",
"name": null,
"privateIpAddress": null,
"privateIpAllocationMethod": null,
"provisioningState": null,
"publicIpAddress": null,
"resourceGroup": "dev-eu2",
"subnet": null
}
],
"name": "dev-eu2-dc-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.34.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-sql-subnet",
"ipConfigurations": null,
"name": "dev-eu2-sql-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.36.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-qlik-subnet",
"ipConfigurations": null,
"name": "dev-eu2-qlik-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.38.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-k8s-subnet",
"ipConfigurations": null,
"name": "dev-eu2-k8s-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.40.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-elk-subnet",
"ipConfigurations": null,
"name": "dev-eu2-elk-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.42.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-cb-subnet",
"ipConfigurations": null,
"name": "dev-eu2-cb-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.44.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-idb-subnet",
"ipConfigurations": null,
"name": "dev-eu2-idb-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.46.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-rmq-subnet",
"ipConfigurations": null,
"name": "dev-eu2-rmq-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
}
],
"tags": null,
"type": "Microsoft.Network/virtualNetworks",
"virtualNetworkPeerings": []
}
Successfully updating DNS servers AFTER manually setting them in the Portal. Specifying TWO servers.
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:58AM > az network vnet update --name dev-eu2-vnet --resource-group dev-eu2 --dns-servers 172.16.32.4 8.8.8.8
{
"addressSpace": {
"addressPrefixes": [
"172.16.32.0/19"
]
},
"dhcpOptions": {
"dnsServers": [
"172.16.32.4",
"8.8.8.8"
]
},
"enableDdosProtection": false,
"enableVmProtection": false,
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet",
"location": "eastus2",
"name": "dev-eu2-vnet",
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceGuid": "REDACTED",
"subnets": [
{
"addressPrefix": "172.16.32.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-dc-subnet",
"ipConfigurations": [
{
"etag": null,
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/networkInterfaces/dev-eu2-dcVMNic/ipConfigurations/ipconfigdev-eu2-dc",
"name": null,
"privateIpAddress": null,
"privateIpAllocationMethod": null,
"provisioningState": null,
"publicIpAddress": null,
"resourceGroup": "dev-eu2",
"subnet": null
}
],
"name": "dev-eu2-dc-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.34.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-sql-subnet",
"ipConfigurations": null,
"name": "dev-eu2-sql-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.36.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-qlik-subnet",
"ipConfigurations": null,
"name": "dev-eu2-qlik-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.38.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-k8s-subnet",
"ipConfigurations": null,
"name": "dev-eu2-k8s-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.40.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-elk-subnet",
"ipConfigurations": null,
"name": "dev-eu2-elk-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.42.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-cb-subnet",
"ipConfigurations": null,
"name": "dev-eu2-cb-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.44.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-idb-subnet",
"ipConfigurations": null,
"name": "dev-eu2-idb-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.16.46.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-eu2/providers/Microsoft.Network/virtualNetworks/dev-eu2-vnet/subnets/dev-eu2-rmq-subnet",
"ipConfigurations": null,
"name": "dev-eu2-rmq-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-eu2",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
}
],
"tags": null,
"type": "Microsoft.Network/virtualNetworks",
"virtualNetworkPeerings": []
}
Dir: /home/tj/git/Dev.Builder [master]
Usr: tj - Mon 30, 8:58AM > az network vnet update --name dev-we-vnet --resource-group dev-we --dns-servers 172.17.32.4 8.8.8.8
{
"addressSpace": {
"addressPrefixes": [
"172.17.32.0/19"
]
},
"dhcpOptions": {
"dnsServers": [
"172.17.32.4",
"8.8.8.8"
]
},
"enableDdosProtection": false,
"enableVmProtection": false,
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet",
"location": "westeurope",
"name": "dev-we-vnet",
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceGuid": "REDACTED",
"subnets": [
{
"addressPrefix": "172.17.32.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-dc-subnet",
"ipConfigurations": [
{
"etag": null,
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/networkInterfaces/dev-we-dcVMNic/ipConfigurations/ipconfigdev-we-dc",
"name": null,
"privateIpAddress": null,
"privateIpAllocationMethod": null,
"provisioningState": null,
"publicIpAddress": null,
"resourceGroup": "dev-we",
"subnet": null
}
],
"name": "dev-we-dc-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.34.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-sql-subnet",
"ipConfigurations": null,
"name": "dev-we-sql-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.36.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-qlik-subnet",
"ipConfigurations": null,
"name": "dev-we-qlik-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.38.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-k8s-subnet",
"ipConfigurations": null,
"name": "dev-we-k8s-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.40.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-elk-subnet",
"ipConfigurations": null,
"name": "dev-we-elk-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.42.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-cb-subnet",
"ipConfigurations": null,
"name": "dev-we-cb-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.44.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-idb-subnet",
"ipConfigurations": null,
"name": "dev-we-idb-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
},
{
"addressPrefix": "172.17.46.0/23",
"etag": "W/\"REDACTED\"",
"id": "/subscriptions/REDACTED/resourceGroups/dev-we/providers/Microsoft.Network/virtualNetworks/dev-we-vnet/subnets/dev-we-rmq-subnet",
"ipConfigurations": null,
"name": "dev-we-rmq-subnet",
"networkSecurityGroup": null,
"provisioningState": "Succeeded",
"resourceGroup": "dev-we",
"resourceNavigationLinks": null,
"routeTable": null,
"serviceEndpoints": []
}
],
"tags": null,
"type": "Microsoft.Network/virtualNetworks",
"virtualNetworkPeerings": []
}
@tjprescott just realized I forgot to answer your second question.
I am deploying the original network using azure-cli and this network schema.
Deployment Commands
az group deployment create --name dev-eu2-networking --resource-group dev-eu2 --template-file /home/tj/git/Dev.Builder/azure-cli/raw_json/dev-eu2-vnets-subnets.json > /dev/null
az group deployment create --name dev-we-networking --resource-group dev-we --template-file /home/tj/git/Dev.Builder/azure-cli/raw_json/dev-we-vnets-subnets.json > /dev/null
dev-eu2 networking JSON
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { },
"variables": { },
"resources": [
{
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"name": "dev-eu2-vnet",
"properties": {
"addressSpace": {
"addressPrefixes": [
"172.16.32.0/19"
]
},
"subnets": [
{
"name": "dev-eu2-dc-subnet",
"properties": {
"addressPrefix": "172.16.32.0/23"
}
},
{
"name": "dev-eu2-sql-subnet",
"properties": {
"addressPrefix": "172.16.34.0/23"
}
}, {
"name": "dev-eu2-qlik-subnet",
"properties": {
"addressPrefix": "172.16.36.0/23"
}
},
{
"name": "dev-eu2-k8s-subnet",
"properties": {
"addressPrefix": "172.16.38.0/23"
}
},
{
"name": "dev-eu2-elk-subnet",
"properties": {
"addressPrefix": "172.16.40.0/23"
}
},
{
"name": "dev-eu2-cb-subnet",
"properties": {
"addressPrefix": "172.16.42.0/23"
}
},
{
"name": "dev-eu2-idb-subnet",
"properties": {
"addressPrefix": "172.16.44.0/23"
}
},
{
"name": "dev-eu2-rmq-subnet",
"properties": {
"addressPrefix": "172.16.46.0/23"
}
}
]
},
"type": "Microsoft.Network/virtualNetworks"
}
]
}
dev-we Networking JSON
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": { },
"variables": { },
"resources": [
{
"apiVersion": "2016-03-30",
"location": "[resourceGroup().location]",
"name": "dev-we-vnet",
"properties": {
"addressSpace": {
"addressPrefixes": [
"172.17.32.0/19"
]
},
"subnets": [
{
"name": "dev-we-dc-subnet",
"properties": {
"addressPrefix": "172.17.32.0/23"
}
},
{
"name": "dev-we-sql-subnet",
"properties": {
"addressPrefix": "172.17.34.0/23"
}
}, {
"name": "dev-we-qlik-subnet",
"properties": {
"addressPrefix": "172.17.36.0/23"
}
},
{
"name": "dev-we-k8s-subnet",
"properties": {
"addressPrefix": "172.17.38.0/23"
}
},
{
"name": "dev-we-elk-subnet",
"properties": {
"addressPrefix": "172.17.40.0/23"
}
},
{
"name": "dev-we-cb-subnet",
"properties": {
"addressPrefix": "172.17.42.0/23"
}
},
{
"name": "dev-we-idb-subnet",
"properties": {
"addressPrefix": "172.17.44.0/23"
}
},
{
"name": "dev-we-rmq-subnet",
"properties": {
"addressPrefix": "172.17.46.0/23"
}
}
]
},
"type": "Microsoft.Network/virtualNetworks"
}
]
}
Ah, @zimmertr thanks for that! I suspect after you run your deployments, if you show your VNET, you'll see dhcpOptions: null. When the VNET is created using VNET create, you'd see:
dhcpOptions: {
dnsServers: []
}
Which is why I couldn't reproduce. I'll get this fix into the next release (mid-November)
As a temp workaround, you can use the generic arguments:
az network vnet update -g tjp-vnet -n vnet2 --set dhcpOptions={'dnsServers':['1.2.3.4', '2.3.4.5']}
This quoting is for CMD. You may need to tweak it for bash.
Cheers, glad to hear it's been verified.
Most helpful comment
Ah, @zimmertr thanks for that! I suspect after you run your deployments, if you show your VNET, you'll see
dhcpOptions: null. When the VNET is created using VNET create, you'd see:Which is why I couldn't reproduce. I'll get this fix into the next release (mid-November)