From 6b9701432cb2454649a17f79834c073daa3b3932 Mon Sep 17 00:00:00 2001 From: polichtm Date: Thu, 24 Jun 2021 06:02:30 -0400 Subject: [PATCH] addressing #223 --- Allfiles/Labs/06/az104-06-vm-template.json | 199 --------------------- 1 file changed, 199 deletions(-) delete mode 100644 Allfiles/Labs/06/az104-06-vm-template.json diff --git a/Allfiles/Labs/06/az104-06-vm-template.json b/Allfiles/Labs/06/az104-06-vm-template.json deleted file mode 100644 index 1afeef35..00000000 --- a/Allfiles/Labs/06/az104-06-vm-template.json +++ /dev/null @@ -1,199 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "vmSize": { - "type": "string", - "defaultValue": "Standard_D2s_v3", - "metadata": { - "description": "Virtual machine size" - } - }, - "nameSuffix": { - "type": "string", - "allowedValues": [ - "2", - "3" - ], - "metadata": { - "description": "Naming suffix" - } - }, - "adminUsername": { - "type": "string", - "metadata": { - "description": "Admin username" - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Admin password" - } - } - }, - "variables": { - "vmName": "[concat('az104-06-vm',parameters('nameSuffix'))]", - "vmExtensionName": "customScriptExtension", - "nicName": "[concat('az104-06-nic',parameters('nameSuffix'))]", - "virtualNetworkName": "[concat('az104-06-vnet',parameters('nameSuffix'))]", - "nsgName": "[concat('az104-06-nsg',parameters('nameSuffix'))]", - "vnetIpPrefix": "[concat('10.6',parameters('nameSuffix'),'.0.0/22')]", - "subnetIpPrefix": "[concat('10.6',parameters('nameSuffix'),'.0.0/24')]", - "subnetName": "subnet0", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", - "computeApiVersion": "2018-10-01", - "networkApiVersion": "2018-12-01" - }, - "resources": [ - { - "name": "[variables('vmName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "[variables('computeApiVersion')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[variables('nicName')]" - ], - "properties": { - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "windowsConfiguration": { - "provisionVmAgent": "true" - } - }, - "hardwareProfile": { - "vmSize": "[parameters('vmSize')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", - "sku": "2019-Datacenter", - "version": "latest" - }, - "osDisk": { - "createOption": "fromImage" - }, - "dataDisks": [] - }, - "networkProfile": { - "networkInterfaces": [ - { - "properties": { - "primary": true - }, - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" - } - ] - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines/extensions", - "name": "[concat(variables('vmName'), '/', variables('vmExtensionName'))]", - "apiVersion": "[variables('computeApiVersion')]", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.7", - "autoUpgradeMinorVersion": true, - "settings": { - "commandToExecute": "powershell.exe Install-WindowsFeature -name Web-Server -IncludeManagementTools && powershell.exe remove-item 'C:\\inetpub\\wwwroot\\iisstart.htm' && powershell.exe Add-Content -Path 'C:\\inetpub\\wwwroot\\iisstart.htm' -Value $('Hello World from ' + $env:computername)" - } - } - }, - { - "type": "Microsoft.Network/virtualNetworks", - "name": "[variables('virtualNetworkName')]", - "apiVersion": "[variables('networkApiVersion')]", - "location": "[resourceGroup().location]", - "comments": "Virtual Network", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('vnetIpPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetIpPrefix')]" - } - } - ] - } - }, - { - "name": "[variables('nicName')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "[variables('networkApiVersion')]", - "location": "[resourceGroup().location]", - "comments": "Primary NIC", - "dependsOn": [ - "[variables('nsgName')]", - "[variables('virtualNetworkName')]" - ], - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "subnet": { - "id": "[variables('subnetRef')]" - }, - "privateIPAllocationMethod": "Dynamic" - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" - } - } - }, - { - "name": "[variables('nsgName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "[variables('networkApiVersion')]", - "location": "[resourceGroup().location]", - "comments": "Network Security Group (NSG) for Primary NIC", - "properties": { - "securityRules": [ - { - "name": "default-allow-rdp", - "properties": { - "priority": 1000, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "3389", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "default-allow-http", - "properties": { - "priority": 1100, - "sourceAddressPrefix": "*", - "protocol": "Tcp", - "destinationPortRange": "80", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] - } - } - ], - "outputs": {} -} \ No newline at end of file