Skip to content

Commit 26fa18d

Browse files
authored
Revert "patch 101 simple windows vm with reduced set of params with default values"
1 parent b1187e2 commit 26fa18d

File tree

2 files changed

+29
-15
lines changed

2 files changed

+29
-15
lines changed

101-simple-windows-vm/azuredeploy.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,32 @@
66
"type": "string",
77
"metadata": {
88
"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+
}
1110
},
1211
"vmName": {
1312
"type": "string",
1413
"metadata": {
1514
"description": "Name of the VM."
16-
},
17-
"defaultValue": "[substring(replace(replace(tolower(concat('vm',resourceGroup().name)), '-', ''), '.',''),0,8)]"
15+
}
1816
},
1917
"adminUsername": {
2018
"type": "string",
2119
"metadata": {
2220
"description": "Username for the Virtual Machine."
23-
},
24-
"defaultValue": "vmadmin1"
21+
}
2522
},
2623
"adminPassword": {
2724
"type": "securestring",
2825
"metadata": {
2926
"description": "The password for the Administrator account of the new VMs. Default value is subscription id"
3027
},
31-
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
28+
"defaultValue": "[substring(resourcegroup().id,15,36)]"
3229
},
3330
"dnsNameForPublicIP": {
3431
"type": "string",
3532
"metadata": {
3633
"description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
37-
},
38-
"defaultValue": "[replace(replace(tolower(concat('dns',resourceGroup().name)), '-', ''), '.','')]"
34+
}
3935
},
4036
"windowsOSVersion": {
4137
"type": "string",
@@ -55,19 +51,19 @@
5551
"imagePublisher": "MicrosoftWindowsServer",
5652
"imageOffer": "WindowsServer",
5753
"OSDiskName": "osdisk",
58-
"nicName": "[replace(replace(tolower(concat('nic',resourceGroup().name)), '-', ''), '.','')]",
54+
"nicName": "myVnic",
5955
"addressPrefix": "10.0.0.0/24",
60-
"subnetName": "[replace(replace(tolower(concat('subnet',resourceGroup().name)), '-', ''), '.','')]",
56+
"subnetName": "mySubnet",
6157
"subnetPrefix": "10.0.0.0/24",
6258
"storageAccountType": "Standard_LRS",
63-
"publicIPAddressName": "[replace(replace(tolower(concat('pip',resourceGroup().name)), '-', ''), '.','')]",
59+
"publicIPAddressName": "myPublicIP",
6460
"publicIPAddressType": "Dynamic",
6561
"vmStorageAccountContainerName": "vhds",
6662
"vmSize": "Standard_A1",
67-
"virtualNetworkName": "[replace(replace(tolower(concat('vnet',resourceGroup().name)), '-', ''), '.','')]",
63+
"virtualNetworkName": "myVnet",
6864
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
6965
"subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]",
70-
"networkSecurityGroupName": "[replace(replace(tolower(concat('nsg',resourceGroup().name)), '-', ''), '.','')]"
66+
"networkSecurityGroupName": "mySG"
7167
},
7268
"resources": [
7369
{
@@ -141,7 +137,10 @@
141137
}
142138
}
143139
}
144-
]
140+
],
141+
"dhcpOptions": {
142+
"dnsServers": ["192.168.100.2"]
143+
}
145144
}
146145
},
147146
{
@@ -154,6 +153,9 @@
154153
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
155154
],
156155
"properties": {
156+
"dnsSettings": {
157+
"dnsServers": ["192.168.100.2"]
158+
},
157159
"ipConfigurations": [
158160
{
159161
"name": "ipconfig1",

101-simple-windows-vm/azuredeploy.parameters.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
5+
"newStorageAccountName": {
6+
"value": "mystorage001"
7+
},
8+
"vmName": {
9+
"value": "myVM001"
10+
},
11+
"adminUsername": {
12+
"value": "admin123"
13+
},
14+
"dnsNameForPublicIP": {
15+
"value": "mydns001"
16+
},
517
"windowsOSVersion": {
618
"value": "2012-R2-Datacenter"
719
}

0 commit comments

Comments
 (0)