Skip to content

Commit

Permalink
express_single_nic: adding default values to most parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekkumac committed Mar 27, 2018
1 parent 46e8e9a commit e355748
Showing 1 changed file with 85 additions and 34 deletions.
119 changes: 85 additions & 34 deletions templates/express_single_nic/mainTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,99 @@
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string"
},
"virtualMachineName": {
"type": "string"
"defaultValue": "NetScaler-VPX-Express",
"type": "string",
"metadata": {
"description": "Name of the Virtual Machine."
}
},
"virtualMachineSize": {
"type": "string"
"defaultValue": "Standard_DS3_v2",
"type": "String",
"allowedValues": [
"Standard_DS3_v2"
],
"metadata": {
"description": "Size of Azure Virtual Machine."
}
},
"adminUsername": {
"type": "string"
"defaultValue": "nsroot",
"type": "String",
"metadata": {
"description": "Admin user name for the Virtual Machine."
}
},
"adminPassword": {
"type": "securestring"
"type": "SecureString",
"metadata": {
"description": "Admin password for the Virtual Machine."
}
},
"virtualNetworkName": {
"type": "string"
"defaultValue": "vnet01",
"type": "String",
"metadata": {
"description": "Name of Virtual Network"
}
},
"vnetRG": {
"type": "string"
"vnetResourceGroup": {
"defaultValue": "",
"type": "String",
"metadata": {
"description": "Resource Group name of existing Virtual Network. Leave empty if Resource Group is same as current deployment."
}
},
"vnetNewOrExisting": {
"type": "string"
"defaultValue": "new",
"allowedValues": [
"new",
"existing"
],
"type": "String"
},
"networkInterfaceName": {
"type": "string"
"defaultValue": "NetScaler-VPX-Express-Nic",
"type": "string",
"metadata": {
"description": "Name of the Virtual Network Interface Card."
}
},
"networkSecurityGroupName": {
"type": "string"
"defaultValue": "NetScaler-VPX-Express-nsg",
"type": "string",
"metadata": {
"description": "Name of the Network Security Group."
}
},
"diagnosticsStorageAccountName": {
"type": "string"
},
"diagnosticsStorageAccountType": {
"type": "string"
"defaultValue": "",
"type": "string",
"metadata": {
"description": "Name of the diagnostics Storage Account. If left empty, an auto-generated name will be used."
}
},
"addressPrefix": {
"type": "string"
"defaultValue": "10.11.0.0/24",
"type": "String",
"metadata": {
"description": "Value of virtual network's Address range in CIDR form. Ignore this field if opting for existing Virtual Network."
}
},
"subnetName": {
"type": "string"
"defaultValue": "default_subnet",
"type": "string",
"metadata": {
"description": "Name of subnet. ensure subnet exists in case of existing Virtual Network."
}
},
"subnetPrefix": {
"type": "string"
"defaultValue": "10.11.0.0/24",
"type": "String",
"metadata": {
"description": "Value of default subnet address range in CIDR form. Ignore this field if opting for existing Virtual Network, Address prefix will be picked from existing Subnet."
}
},
"baseUrl": {
"defaultValue": "https://github.com/citrix/netscaler-azure-templates",
Expand All @@ -57,15 +106,17 @@
}
},
"variables": {
"vnetId": "[resourceId(parameters('vnetRG'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
"vnetRg": "[if(equals(parameters('vnetResourceGroup'), ''), resourceGroup().name,parameters('vnetResourceGroup'))]",
"vnetId": "[resourceId(variables('vnetRG'),'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]",
"subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]",
"nicId": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]"
"nicId": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]",
"diagnosticsStorageAccountName": "[if(equals(parameters('diagnosticsStorageAccountName'), ''), concat('vpxstracct', uniqueString(resourceGroup().id)), parameters('diagnosticsStorageAccountName'))]"
},
"resources": [{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'),'/', 'vpx-express')]",
"apiVersion": "2017-12-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
],
Expand All @@ -86,11 +137,11 @@
"name": "[parameters('virtualMachineName')]",
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2017-12-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]",
"[concat('Microsoft.Network/publicIpAddresses/', parameters('virtualMachineName'), '-nsip')]",
"[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]"
"[concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName'))]"
],
"properties": {
"osProfile": {
Expand Down Expand Up @@ -126,7 +177,7 @@
"diagnosticsProfile": {
"bootDiagnostics": {
"enabled": true,
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', parameters('diagnosticsStorageAccountName')), '2017-10-01').primaryEndpoints['blob']]"
"storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts', variables('diagnosticsStorageAccountName')), '2017-10-01').primaryEndpoints['blob']]"
}
}
},
Expand All @@ -136,20 +187,20 @@
"product": "netscalervpx-120"
}
}, {
"name": "[parameters('diagnosticsStorageAccountName')]",
"name": "[variables('diagnosticsStorageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2017-10-01",
"kind": "Storage",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('diagnosticsStorageAccountType')]"
"name": "Standard_LRS"
},
"properties": {}
}, {
"name": "[parameters('virtualNetworkName')]",
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"properties": {
"addressSpace": {
"addressPrefixes": [
Expand All @@ -169,7 +220,7 @@
"name": "[parameters('networkInterfaceName')]",
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
"[concat('Microsoft.Network/publicIpAddresses/', parameters('virtualMachineName'), '-vip')]",
Expand Down Expand Up @@ -218,7 +269,7 @@
"name": "[concat(parameters('virtualMachineName'), '-vip')]",
"type": "Microsoft.Network/publicIpAddresses",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIpAllocationMethod": "Dynamic"
},
Expand All @@ -229,7 +280,7 @@
"name": "[concat(parameters('virtualMachineName'), '-nsip')]",
"type": "Microsoft.Network/publicIpAddresses",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"properties": {
"publicIpAllocationMethod": "Dynamic"
},
Expand All @@ -240,7 +291,7 @@
"name": "[parameters('networkSecurityGroupName')]",
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2017-10-01",
"location": "[parameters('location')]",
"location": "[resourceGroup().location]",
"properties": {
"securityRules": [{
"name": "ssh-rule",
Expand Down

0 comments on commit e355748

Please sign in to comment.