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