Skip to content

Commit 85313ee

Browse files
JesusAlvarezTorresvikasnav
authored andcommitted
Vikasnav patch 1 (#189)
Merge all the changes from Vikasnav-patch-1. The changes contain removal of Public IP addresses, removal of unwanted parameters and fix bugs
1 parent 8602eda commit 85313ee

File tree

37 files changed

+212
-282
lines changed

37 files changed

+212
-282
lines changed

101-create-storage-account/azuredeploy.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@
3030
}
3131
],
3232
"outputs": {}
33-
}
33+
34+
}
35+

101-linux-customscript-ext/azuredeploy.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"vmName": {
6-
"type": "string",
7-
"metadata": {
8-
"description": "Name of the existing VM to apply Linux custom script to"
9-
},
10-
"defaultValue": "[concat('vm', resourceGroup().name)]"
11-
}
6+
"type": "string",
7+
"metadata": {
8+
"description": "Name of the existing VM to apply Linux custom script to"
9+
},
10+
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
11+
}
1212
},
1313
"variables": {
1414
},

101-linux-docker-extension/azuredeploy.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"vmName": {
6-
"type": "string",
7-
"metadata": {
8-
"description": "Name of the existing VM to apply Docker extension to"
9-
},
10-
"defaultValue": "[concat('vm', resourceGroup().name)]"
6+
"type": "string",
7+
"metadata": {
8+
"description": "Name of the existing VM to apply Docker extension to"
9+
},
10+
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
1111
}
12-
1312
},
1413
"variables": {
1514
},

101-linux-vmaccess-ext/azuredeploy.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"vmName": {
6-
"type": "string",
7-
"metadata": {
8-
"description": "Name of the existing Linux VM to modify"
9-
},
10-
"defaultValue": "[concat('vm', resourceGroup().name)]"
6+
"type": "string",
7+
"metadata": {
8+
"description": "Name of the existing Linux VM to modify"
9+
},
10+
"defaultValue": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]"
1111
},
1212
"username": {
1313
"type": "string",
@@ -19,7 +19,8 @@
1919
"type": "securestring",
2020
"metadata": {
2121
"description": "Password for new or existing user"
22-
}
22+
},
23+
"defaultValue": "[concat('Subscription#',substring(resourcegroup().id,15,36))]"
2324
}
2425
},
2526
"variables": {

101-linux-vmaccess-ext/azuredeploy.parameters.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"parameters": {
55
"username": {
66
"value": "Test"
7-
},
8-
"password": {
9-
"value": "GEN-PASSWORD"
107
}
118
}
129
}

101-simple-linux-vm/azuredeploy.json

Lines changed: 90 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@
4848
"subnetPrefix": "10.0.0.0/24",
4949
"storageAccountName": "[concat('sa', uniquestring(resourceGroup().id))]",
5050
"storageAccountType": "Standard_LRS",
51-
"publicIPAddressName": "[tolower(concat('pip',uniquestring(resourceGroup().id)))]",
52-
"publicIPAddressType": "Dynamic",
5351
"vmStorageAccountContainerName": "vhds",
54-
"vmName": "[concat('vm', resourceGroup().name)]",
52+
"vmName": "[substring(concat('simplelinuxvm',resourceGroup().Name),0,14)]",
5553
"vmSize": "Standard_A1",
5654
"virtualNetworkName": "[tolower(concat('vnet',uniquestring(resourceGroup().id)))]",
5755
"vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
@@ -90,119 +88,103 @@
9088
}
9189
}
9290
]
93-
}
94-
},
95-
{
96-
"apiVersion": "2015-05-01-preview",
97-
"type": "Microsoft.Network/publicIPAddresses",
98-
"name": "[variables('publicIPAddressName')]",
99-
"location": "[variables('location')]",
100-
"properties": {
101-
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
102-
"dnsSettings": {
103-
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
91+
}
92+
},
93+
{
94+
"apiVersion": "2015-05-01-preview",
95+
"type": "Microsoft.Network/virtualNetworks",
96+
"name": "[variables('virtualNetworkName')]",
97+
"location": "[variables('location')]",
98+
"properties": {
99+
"addressSpace": {
100+
"addressPrefixes": [
101+
"[variables('addressPrefix')]"
102+
]
103+
},
104+
"subnets": [
105+
{
106+
"name": "[variables('subnetName')]",
107+
"properties": {
108+
"addressPrefix": "[variables('subnetPrefix')]"
109+
}
104110
}
105-
}
106-
},
107-
{
108-
"apiVersion": "2015-05-01-preview",
109-
"type": "Microsoft.Network/virtualNetworks",
110-
"name": "[variables('virtualNetworkName')]",
111-
"location": "[variables('location')]",
112-
"properties": {
113-
"addressSpace": {
114-
"addressPrefixes": [
115-
"[variables('addressPrefix')]"
116-
]
117-
},
118-
"subnets": [
119-
{
120-
"name": "[variables('subnetName')]",
121-
"properties": {
122-
"addressPrefix": "[variables('subnetPrefix')]"
111+
]
112+
}
113+
},
114+
{
115+
"apiVersion": "2015-05-01-preview",
116+
"type": "Microsoft.Network/networkInterfaces",
117+
"name": "[variables('nicName')]",
118+
"location": "[variables('location')]",
119+
"dependsOn": [
120+
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
121+
"[variables('networkSecurityGroupName')]"
122+
],
123+
"properties": {
124+
"networkSecurityGroup": {
125+
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
126+
},
127+
"ipConfigurations": [
128+
{
129+
"name": "ipconfig1",
130+
"properties": {
131+
"privateIPAllocationMethod": "Dynamic",
132+
"subnet": {
133+
"id": "[variables('subnetRef')]"
123134
}
124135
}
125-
]
126-
}
127-
},
128-
{
129-
"apiVersion": "2015-05-01-preview",
130-
"type": "Microsoft.Network/networkInterfaces",
131-
"name": "[variables('nicName')]",
132-
"location": "[variables('location')]",
133-
"dependsOn": [
134-
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
135-
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]",
136-
"[variables('networkSecurityGroupName')]"
137-
],
138-
"properties": {
139-
"networkSecurityGroup": {
140-
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
136+
}
137+
]
138+
}
139+
},
140+
{
141+
"apiVersion": "2015-06-15",
142+
"type": "Microsoft.Compute/virtualMachines",
143+
"name": "[variables('vmName')]",
144+
"location": "[variables('location')]",
145+
"dependsOn": [
146+
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
147+
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
148+
],
149+
"properties": {
150+
"hardwareProfile": {
151+
"vmSize": "[variables('vmSize')]"
152+
},
153+
"osProfile": {
154+
"computerName": "[variables('vmName')]",
155+
"adminUsername": "[parameters('adminUsername')]",
156+
"adminPassword": "[parameters('adminPassword')]"
157+
},
158+
"storageProfile": {
159+
"imageReference": {
160+
"publisher": "[parameters('imagePublisher')]",
161+
"offer": "[parameters('imageOffer')]",
162+
"sku": "[parameters('imageSku')]",
163+
"version": "latest"
141164
},
142-
"ipConfigurations": [
165+
"osDisk": {
166+
"name": "osdisk",
167+
"vhd": {
168+
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('OSDiskName'), '.vhd')]"
169+
},
170+
"caching": "ReadWrite",
171+
"createOption": "FromImage"
172+
}
173+
},
174+
"networkProfile": {
175+
"networkInterfaces": [
143176
{
144-
"name": "ipconfig1",
145-
"properties": {
146-
"privateIPAllocationMethod": "Dynamic",
147-
"publicIPAddress": {
148-
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
149-
},
150-
"subnet": {
151-
"id": "[variables('subnetRef')]"
152-
}
153-
}
177+
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
154178
}
155179
]
156-
}
157-
},
158-
{
159-
"apiVersion": "2015-06-15",
160-
"type": "Microsoft.Compute/virtualMachines",
161-
"name": "[variables('vmName')]",
162-
"location": "[variables('location')]",
163-
"dependsOn": [
164-
"[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]",
165-
"[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
166-
],
167-
"properties": {
168-
"hardwareProfile": {
169-
"vmSize": "[variables('vmSize')]"
170-
},
171-
"osProfile": {
172-
"computerName": "[variables('vmName')]",
173-
"adminUsername": "[parameters('adminUsername')]",
174-
"adminPassword": "[parameters('adminPassword')]"
175-
},
176-
"storageProfile": {
177-
"imageReference": {
178-
"publisher": "[parameters('imagePublisher')]",
179-
"offer": "[parameters('imageOffer')]",
180-
"sku": "[parameters('imageSku')]",
181-
"version": "latest"
182-
},
183-
"osDisk": {
184-
"name": "osdisk",
185-
"vhd": {
186-
"uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/', variables('OSDiskName'), '.vhd')]"
187-
},
188-
"caching": "ReadWrite",
189-
"createOption": "FromImage"
190-
}
191-
},
192-
"networkProfile": {
193-
"networkInterfaces": [
194-
{
195-
"id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
196-
}
197-
]
198-
},
199-
"diagnosticsProfile": {
200-
"bootDiagnostics": {
201-
"enabled": "true",
202-
"storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob)]"
203-
}
180+
},
181+
"diagnosticsProfile": {
182+
"bootDiagnostics": {
183+
"enabled": "true",
184+
"storageUri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).primaryEndpoints.blob)]"
204185
}
205186
}
206187
}
207-
]
208188
}
189+
]
190+
}

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

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
5-
"storageAccountNamePrefix": {
6-
"type": "string",
7-
"metadata": {
8-
"description": "Name prefix of the Storage Account. The maximum length of the prefix is 24 characters"
9-
}
10-
},
115
"vmsuffix": {
126
"type": "string",
137
"metadata": {
@@ -31,7 +25,8 @@
3125
"type": "securestring",
3226
"metadata": {
3327
"description": "Password for the Virtual Machine"
34-
}
28+
},
29+
"defaultValue": "[concat('Subscription#',subscription().subscriptionId)]"
3530
},
3631
"windowsOSVersion": {
3732
"type": "string",
@@ -47,7 +42,7 @@
4742
"variables": {
4843
"storage": {
4944
"storageAccounts": {
50-
"name": "[replace(replace(tolower(parameters('storageAccountNamePrefix')), '-',''),'.','')]",
45+
"name": "[concat('sa', uniquestring(resourceGroup().id))]",
5146
"type": "Standard_LRS"
5247
}
5348
},
@@ -58,8 +53,6 @@
5853
"addressPrefix": "10.0.0.0/24",
5954
"subnetName": "Subnet",
6055
"subnetPrefix": "10.0.0.0/24",
61-
"publicIPAddressName": "[concat('myip', parameters('vmsuffix'))]",
62-
"publicIPAddressType": "Dynamic",
6356
"vmStorageAccountContainerName": "vhds",
6457
"vmName": "[concat('myvm', parameters('vmsuffix'))]",
6558
"vmSize": "Standard_A1",
@@ -113,18 +106,6 @@
113106
"accountType": "[variables('storage').storageAccounts.type]"
114107
}
115108
},
116-
{
117-
"apiVersion": "2015-05-01-preview",
118-
"type": "Microsoft.Network/publicIPAddresses",
119-
"name": "[variables('publicIPAddressName')]",
120-
"location": "[resourceGroup().location]",
121-
"properties": {
122-
"publicIPAllocationMethod": "[variables('publicIPAddressType')]",
123-
"dnsSettings": {
124-
"domainNameLabel": "[variables('dnsNameForPublicIP')]"
125-
}
126-
}
127-
},
128109
{
129110
"apiVersion": "2015-05-01-preview",
130111
"type": "Microsoft.Network/virtualNetworks",
@@ -161,7 +142,6 @@
161142
"name": "[variables('nicName')]",
162143
"location": "[resourceGroup().location]",
163144
"dependsOn": [
164-
"[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
165145
"[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
166146
],
167147
"properties": {
@@ -170,9 +150,6 @@
170150
"name": "ipconfig1",
171151
"properties": {
172152
"privateIPAllocationMethod": "Dynamic",
173-
"publicIPAddress": {
174-
"id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
175-
},
176153
"subnet": {
177154
"id": "[variables('subnetRef')]"
178155
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
"vmsuffix": {
66
"value": "myVM"
77
},
8-
"adminPassword": {
9-
"value": "GEN-PASSWORD"
10-
},
11-
"storageAccountNamePrefix": {
12-
"value": "DiagStor"
13-
},
148
"windowsOSVersion": {
159
"value": "2012-R2-Datacenter"
1610
},

0 commit comments

Comments
 (0)