|
6 | 6 | "type": "string", |
7 | 7 | "metadata": { |
8 | 8 | "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed." |
9 | | - }, |
10 | | - "defaultValue": "[replace(replace(tolower(concat('sa',resourceGroup().name)), '-', ''), '.','')]" |
| 9 | + } |
11 | 10 | }, |
12 | 11 | "vmName": { |
13 | 12 | "type": "string", |
14 | 13 | "metadata": { |
15 | 14 | "description": "Name of the VM." |
16 | | - }, |
17 | | - "defaultValue": "[substring(replace(replace(tolower(concat('vm',resourceGroup().name)), '-', ''), '.',''),0,8)]" |
| 15 | + } |
18 | 16 | }, |
19 | 17 | "adminUsername": { |
20 | 18 | "type": "string", |
21 | 19 | "metadata": { |
22 | 20 | "description": "Username for the Virtual Machine." |
23 | | - }, |
24 | | - "defaultValue": "vmadmin1" |
| 21 | + } |
25 | 22 | }, |
26 | 23 | "adminPassword": { |
27 | 24 | "type": "securestring", |
28 | 25 | "metadata": { |
29 | | - "description": "The password for the Administrator account of the new VMs. Default value is subscription id" |
30 | | - }, |
31 | | - "defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]" |
| 26 | + "description": "Password for the Virtual Machine." |
| 27 | + } |
32 | 28 | }, |
33 | 29 | "dnsNameForPublicIP": { |
34 | 30 | "type": "string", |
35 | 31 | "metadata": { |
36 | 32 | "description": "Unique DNS Name for the Public IP used to access the Virtual Machine." |
37 | | - }, |
38 | | - "defaultValue": "[replace(replace(tolower(concat('dns',resourceGroup().name)), '-', ''), '.','')]" |
| 33 | + } |
39 | 34 | }, |
40 | 35 | "windowsOSVersion": { |
41 | 36 | "type": "string", |
|
55 | 50 | "imagePublisher": "MicrosoftWindowsServer", |
56 | 51 | "imageOffer": "WindowsServer", |
57 | 52 | "OSDiskName": "osdisk", |
58 | | - "nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]", |
| 53 | + "nicName": "myVnic", |
59 | 54 | "addressPrefix": "10.0.0.0/24", |
60 | | - "subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]", |
| 55 | + "subnetName": "mySubnet", |
61 | 56 | "subnetPrefix": "10.0.0.0/24", |
62 | 57 | "storageAccountType": "Standard_LRS", |
63 | | - "publicIPAddressName": "[replace(replace(tolower(concat('pip',resourceGroup().name)), '-', ''), '.','')]", |
| 58 | + "publicIPAddressName": "myPublicIP", |
64 | 59 | "publicIPAddressType": "Dynamic", |
65 | 60 | "vmStorageAccountContainerName": "vhds", |
66 | 61 | "vmSize": "Standard_A1", |
67 | | - "virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]", |
| 62 | + "virtualNetworkName": "myVnet", |
68 | 63 | "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", |
69 | 64 | "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]", |
70 | | - "networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]" |
| 65 | + "networkSecurityGroupName": "mySG" |
71 | 66 | }, |
72 | 67 | "resources": [ |
73 | 68 | { |
|
141 | 136 | } |
142 | 137 | } |
143 | 138 | } |
144 | | - ] |
| 139 | + ], |
| 140 | + "dhcpOptions": { |
| 141 | + "dnsServers": ["192.168.100.2"] |
| 142 | + } |
145 | 143 | } |
146 | 144 | }, |
147 | 145 | { |
|
154 | 152 | "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" |
155 | 153 | ], |
156 | 154 | "properties": { |
| 155 | + "dnsSettings": { |
| 156 | + "dnsServers": ["192.168.100.2"] |
| 157 | + }, |
157 | 158 | "ipConfigurations": [ |
158 | 159 | { |
159 | 160 | "name": "ipconfig1", |
|
221 | 222 | } |
222 | 223 | ] |
223 | 224 | } |
| 225 | + |
0 commit comments