diff --git a/public-lb-parameters.json b/public-lb-parameters.json index 9a0b494..07989d2 100644 --- a/public-lb-parameters.json +++ b/public-lb-parameters.json @@ -7,6 +7,9 @@ }, "dnsNameforLBIP": { "value": "publiclbdnslb51g" + }, + "availabilitySetName": { + "value": "myPublicAV" } } } diff --git a/storageAccount-existing.json b/storageAccount-existing.json new file mode 100644 index 0000000..3ba8ab0 --- /dev/null +++ b/storageAccount-existing.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "storageAccountName": { + "type": "string", + "metadata": { + "Description": "The name of the new storage account created to store the VMs disks" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ], + "metadata": { + "Description": "The type of the Storage Account created" + }, + "defaultValue": "Standard_LRS" + }, + "storageAccountExistingRG" : { + "type" : "string", + "defaultValue" : "" + } + }, + "resources": [], + "outputs": { + "sid": { + "value": "[parameters('storageAccountName')]", + "type": "string" + } + } +} diff --git a/storageAccount-new.json b/storageAccount-new.json new file mode 100644 index 0000000..80c8f1f --- /dev/null +++ b/storageAccount-new.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string" + }, + "storageAccountName": { + "type": "string", + "metadata": { + "Description": "The name of the new storage account created to store the VMs disks" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS" + ], + "metadata": { + "Description": "The type of the Storage Account created" + }, + "defaultValue": "Standard_LRS" + }, + "storageAccountExistingRG" : { + "type" : "string", + "defaultValue" : "" + } + }, + "variables": { + "rgname": "[resourceGroup().id]", + "srname": "[concat('storage', variables('rgname'), uniquestring(resourceGroup().id))]", + "spname": "storagesaurabh", + "stname": "[concat(parameters('storageAccountName'), substring(uniqueString(resourceGroup().id), 0, 4))]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('stname')]", + "apiVersion": "2015-06-15", + "location": "[parameters('location')]", + "properties": { + "accountType": "[parameters('storageAccountType')]" + } + } + ], + "outputs": { + "sid": { + "value": "[variables('stname')]", + "type": "string" + } + } +} diff --git a/vmseries-parameters.json b/vmseries-parameters.json new file mode 100644 index 0000000..192b106 --- /dev/null +++ b/vmseries-parameters.json @@ -0,0 +1,57 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "adminUsername": { + "value": "samisra" + }, + "adminPassword": { + "value": "Hello!" + }, + "storageAccountName": { + "value": "storage519" + }, + "vmName": { + "value": "vmname-519" + }, + "MgmtPublicIP": { + "value": "new" + }, + "MgmtPublicIPAddressName": { + "value": "dnsnamemgmt519" + }, + "UntrustPublicIP": { + "value": "none" + }, + "UntrustPublicIPAddressName": { + "value": "dnsnameuntrust519" + }, + "vmSize": { + "value": "Standard_D3" + }, + "virtualNetworkExistingRGName": { + "value": "[resourceGroup().id]" + }, + "Bootstrap": { + "value": "no" + }, + "BootstrapUri": { + "value": "https://samisravhddata.blob.core.windows.net/data/bootstrap-20.vhd.vhd" + }, + "BootstrapUriSizeGB": { + "value": "20" + }, + "lbName": { + "value": "public-lb" + }, + "availabilitySetName": { + "value": "myPublicAV" + }, + "vmCount": { + "value": 2 + }, + "nsgName": { + "value": "nsg-default1" + } + } +} diff --git a/vmseries.json b/vmseries.json index 53b8ede..5dd26f0 100644 --- a/vmseries.json +++ b/vmseries.json @@ -14,12 +14,12 @@ "description": "Availability Set Name for Public Load Balancer" } }, - "numOfVMs": { + "vmCount": { "type": "int", + "defaultValue": 2, "metadata": { "description": "Number of VM-Series firewall" - }, - "defaultValue": "2" + } }, "nsgName": { "type": "string", @@ -327,7 +327,7 @@ "SettingUpPublicIPUrl": "[concat(parameters('baseUrl'),'/publicip-',parameters('MgmtPublicIP'),'.json')]", "setupNICsURL": "[concat(parameters('baseUrl'),'/setupNICS-', parameters('MgmtPublicIP'),'.json')]", "vmTemplateUrl": "[concat(parameters('baseUrl'), '/virtual-machine-', parameters('authenticationType'),'-bs-', parameters('Bootstrap'), '.json')]", - "location": "[location()]" + "location": "[resourceGroup().location]" }, "resources": [ @@ -358,12 +358,12 @@ } }, { - "name": "SettingUpPublicIPs", + "name": "[concat('SettingUpPublicIPs', copyindex())]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "copy": { - "name": "[concat('publicIPLoop', parameters('SettingUpPublicIPs'))]", - "count": "[parameters('numOfVMs')]" + "name": "SettingUpPublicIPsLoop", + "count": "[parameters('vmCount')]" }, "properties": { "mode": "Incremental", @@ -397,15 +397,15 @@ } }, { - "name": "SetupNetworkInterfaces", + "name": "[concat('SetupNetworkInterfaces', copyindex())]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ - "Microsoft.Resources/deployments/SettingUpPublicIPs" + "SettingUpPublicIPsLoop" ], "copy": { "name": "NetworkInterfaceLoop", - "count": "[parameters('numOfVMs')]" + "count": "[parameters('vmCount')]" }, "properties": { "mode": "Incremental", @@ -466,17 +466,17 @@ } }, { - "name": "VMSeries-Firewall-VM", + "name": "[concat('VMSeries-Firewall-VM', copyindex())]", "type": "Microsoft.Resources/deployments", "apiVersion": "2015-01-01", "dependsOn": [ "Microsoft.Resources/deployments/SettingUpStorageAccount", - "Microsoft.Resources/deployments/SettingUpPublicIPs", - "Microsoft.Resources/deployments/SetupNetworkInterfaces" + "SettingUpPublicIPsLoop", + "NetworkInterfaceLoop" ], "copy": { "name": "VirtualMachineLoop", - "count": "[parameters('numOfVMs')]" + "count": "[parameters('vmCount')]" }, "properties": { "mode": "Incremental",