AzureStack-QuickStart-Templ.../sql-2016-ha/azuredeploy.json

958 строки
39 KiB
JSON

{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "The name of the Administrator of the new VMs and Domain"
}
},
"adminPassword": {
"type": "securestring",
"metadata": {
"description": "The password for the Administrator account of the new VMs and Domain"
}
},
"adVMSize": {
"type": "string",
"allowedValues": [
"Standard_A1",
"Standard_A2",
"Standard_A3"
],
"metadata": {
"description": "The size of the AD VMs Created"
},
"defaultValue": "Standard_A2"
},
"sqlVMSize": {
"type": "string",
"allowedValues": [
"Standard_A1",
"Standard_A2",
"Standard_A3"
],
"metadata": {
"description": "The size of the SQL VMs Created"
},
"defaultValue": "Standard_A3"
},
"witnessVMSize": {
"type": "string",
"allowedValues": [
"Standard_A1",
"Standard_A2",
"Standard_A3"
],
"metadata": {
"description": "The size of the Witness VM Created"
},
"defaultValue": "Standard_A1"
},
"vmDiskSize": {
"type": "string",
"allowedValues": [
"128",
"256",
"512",
"1000"
],
"metadata": {
"description": "The size of the VMs data disk in GB."
},
"defaultValue": "128"
},
"domainName": {
"type": "string",
"metadata": {
"description": "The FQDN of the AD Domain created "
},
"defaultValue": "contoso.local"
},
"dnsSuffix": {
"type": "string",
"metadata": {
"description": "The DNS Suffix for reverse lookup of public IPAddresses "
},
"defaultValue": "azurestack.external"
},
"sqlServerServiceAccountUserName": {
"type": "string",
"metadata": {
"description": "The SQL Server Service Account name"
},
"defaultValue": "sqlservice"
},
"sqlServerServiceAccountPassword": {
"type": "securestring",
"metadata": {
"description": "The SQL Server Service Account password"
}
},
"sqlAuthUserName": {
"type": "string",
"metadata": {
"description": "The SQL Server Auth Account name"
},
"defaultValue": "sqlsa"
},
"sqlAuthPassword": {
"type": "securestring",
"metadata": {
"description": "The SQL Server Auth Account password"
}
},
"sqlStorageAccountName": {
"type": "string",
"metadata": {
"description": "The name of Sql Server Storage Account"
},
"defaultValue": "[tolower(concat(take(uniqueString(resourceGroup().id),8),'sql'))]"
},
"sqlStorageAccountType": {
"type": "string",
"allowedValues": [
"Premium_LRS",
"Standard_LRS"
],
"metadata": {
"description": "The type of the Sql Server Storage Account created"
},
"defaultValue": "Standard_LRS"
},
"virtualNetworkAddressRange": {
"type": "string",
"metadata": {
"description": "The address range of the new VNET in CIDR format"
},
"defaultValue": "10.0.0.0/16"
},
"staticSubnet": {
"type": "string",
"metadata": {
"description": "The address range of the subnet static IPs are allocated from in the new VNET"
},
"defaultValue": "10.0.0.0/24"
},
"sqlSubnet": {
"type": "string",
"metadata": {
"description": "The address range of the SQL subnet created in the new VNET"
},
"defaultValue": "10.0.1.0/26"
},
"adPDCNICIPAddress": {
"type": "string",
"metadata": {
"description": "The IP address of the new AD VM"
},
"defaultValue": "10.0.0.4"
},
"deploymentPrefix": {
"type": "string",
"metadata": {
"description": "The DNS Prefix for the Public IP Address for the Always On Cluster"
},
"defaultValue": "aodns"
},
"virtualNetworkName": {
"type": "string",
"metadata": {
"description": "Name of virtual network to be created"
},
"defaultValue": "autohav2VNET"
},
"templatesBaseUrl": {
"type": "string",
"metadata": {
"description": "Linked Templates base url"
},
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/sql-2016-ha"
},
"scriptsBaseUrl": {
"type": "string",
"metadata": {
"description": "DSC Scripts base url"
},
"defaultValue": "https://raw.githubusercontent.com/Azure/AzureStack-QuickStart-Templates/master/sql-2016-ha"
},
"autoPatchingDay": {
"type": "string",
"allowedValues": [
"Never",
"Everyday",
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"metadata": {
"description": "The day of a week for auto patching"
},
"defaultValue": "Never"
},
"autoPatchingStartHour": {
"type": "string",
"allowedValues": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23"
],
"metadata": {
"description": "The start hour of a day for auto patching"
},
"defaultValue": "2"
},
"sqlAOAGName": {
"type": "string",
"metadata": {
"description": "The Sql AlwaysOn Group Name"
},
"defaultValue": "alwayson-ag"
},
"sqlAOListenerPort": {
"type": "string",
"metadata": {
"description": "The Sql AG Listener port"
},
"defaultValue": "1433"
},
"sqlAOListenerName": {
"type": "string",
"metadata": {
"description": "The Sql AG Listener Name"
},
"defaultValue": "[tolower(concat('aon-listener-' , resourceGroup().name))]"
},
"sqlServerVersion": {
"type": "string",
"allowedValues": [
"SQL2016SP1-WS2016-ENT",
"SQL2016SP1-WS2016-DEV"
],
"metadata": {
"description": "The Sql Server Version"
},
"defaultValue": "SQL2016SP1-WS2016-ENT"
},
"workloadType": {
"type": "string",
"allowedValues": [
"GENERAL"
],
"metadata": {
"description": "The Sql VM work load type: GENERAL - general work load"
},
"defaultValue": "GENERAL"
}
},
"variables": {
"lbSettings": {
"rdpLBFE": "rdpLBFE",
"sqlLBFE": "sqlLBFE",
"adLBBE": "adLBBE",
"sqlLBBE": "sqlLBBE",
"rdpLBName": "rdpLoadBalancer",
"sqlLBName": "sqlLoadBalancer"
},
"subnetNames": {
"staticSubnetName": "staticSubnet",
"sqlSubnetName": "sqlSubnet"
},
"RDPNAT": "RDP",
"SQLAOProbe": "SQLAlwaysOnEndPointProbe",
"primaryDCIPAddressName": "primaryDCIP",
"sql1AddressName": "sql1IP",
"sql0AddressName": "sql0IP",
"fswAddressName": "fswIP",
"vmSettings": {
"availabilitySets": {
"sqlAvailabilitySetName": "sqlAvailabilitySet",
"adAvailabilitySetName": "adAvailabilitySet"
},
"numberOfSqlVMDisks": "2",
"vmContainerName": "vhds",
"adPDCVMName": "[substring(concat('priDC-', uniquestring(replace(resourceGroup().Id,'-',''))), 0, 8)]",
"sqlVMName": "[substring(concat('sql-', uniquestring(replace(resourceGroup().Id,'-',''))), 0, 8)]",
"sqlwVMName": "[substring(concat('fsw-', uniquestring(replace(resourceGroup().Id,'-',''))), 0, 8)]",
"windowsImagePublisher": "MicrosoftWindowsServer",
"windowsImageOffer": "WindowsServer",
"windowsImageSKU": "2016-Datacenter",
"sqlImagePublisher": "MicrosoftSQLServer"
},
"sqlAOEPName": "[concat(parameters('deploymentPrefix'),'-hadr')]",
"sharePath": "[concat(parameters('deploymentPrefix'),'-fsw')]",
"clusterName": "[concat(parameters('deploymentPrefix'),'-fc')]",
"adPDCNicName": "[concat(variables('vmSettings').adPDCVMName,'-nic')]",
"sqlwNicName": "[concat(variables('vmSettings').sqlwVMName,'-nic')]",
"VnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkNameWithSuffix'))]",
"staticSubnetRef": "[concat(variables('VnetID'),'/subnets/',variables('subnetNames').staticSubnetName)]",
"sqlSubnetRef": "[concat(variables('VnetID'),'/subnets/',variables('subnetNames').sqlSubnetName)]",
"dnsPrefix": "[parameters('sqlAOListenerName')]",
"publicIPAddressName": "[concat('SQLPIP',resourceGroup().name)]",
"ids": {
"adNicId": "[resourceId('Microsoft.Network/networkInterfaces',variables('adPDCNicName'))]",
"rdplbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').rdpLBName)]",
"sqllbID": "[resourceId('Microsoft.Network/loadBalancers',variables('lbSettings').sqlLBName)]",
"publicIPAddressID": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
},
"derivedIds": {
"adIPConfigID": "[concat(variables('ids').adNicId,'/ipConfigurations/ipconfig1')]",
"rdplbFEConfigID": "[concat(variables('ids').rdplbID,'/frontendIPConfigurations/',variables('lbSettings').rdpLBFE)]",
"adRDPNATRuleID": "[concat(variables('ids').rdplbID,'/inboundNatRules/',variables('RDPNAT'))]",
"adBEAddressPoolID": "[concat(variables('ids').rdplbID,'/backendAddressPools/',variables('lbSettings').adLBBE)]",
"sqlBEAddressPoolID": "[concat(variables('ids').sqllbID,'/backendAddressPools/',variables('lbSettings').sqlLBBE)]",
"sqllbFEConfigID": "[concat(variables('ids').sqllbID,'/frontendIPConfigurations/',variables('lbSettings').sqlLBFE)]",
"sqllbProbeID": "[concat(variables('ids').sqllbID,'/probes/',variables('SQLAOProbe'))]"
},
"SQL2016SP1-WS2016-ENT": "Enterprise",
"SQL2016SP1-WS2016-DEV": "Developer",
"Monday": true,
"Tuesday": true,
"Wednesday": true,
"Thursday": true,
"Friday": true,
"Saturday": true,
"Sunday": true,
"Never": false,
"Everyday": true,
"nsgName": "[concat('Nsg',resourceGroup().name)]",
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
"subnets": [
{
"name": "[variables('subnetNames').staticSubnetName]",
"properties": {
"addressPrefix": "[parameters('staticSubnet')]",
"networkSecurityGroup": {
"id": "[variables('nsgID')]"
}
}
},
{
"name": "[variables('subnetNames').sqlSubnetName]",
"properties": {
"addressPrefix": "[parameters('sqlSubnet')]",
"networkSecurityGroup": {
"id": "[variables('nsgID')]"
}
}
}
],
"virtualNetworkNameWithSuffix": "[substring(concat(parameters('virtualNetworkName'), uniqueString(parameters('sqlStorageAccountName'))),0,15)]",
"primaryDCIPAddressNameWithSuffix": "[substring(concat(variables('primaryDCIPAddressName'), uniqueString(parameters('sqlStorageAccountName'))),0,15)]",
"sql1AddressNameWithSuffix": "[substring(concat(variables('sql1AddressName'), uniqueString(parameters('sqlStorageAccountName'))),0,15)]",
"sql0AddressNameWithSuffix": "[substring(concat(variables('sql0AddressName'), uniqueString(parameters('sqlStorageAccountName'))),0,15)]",
"dcStorageAccountName": "[concat(substring(concat(parameters('sqlStorageAccountName'), uniqueString(parameters('sqlStorageAccountName'))),0,18),'dc')]",
"dcStorageAccountType": "Standard_LRS",
"configuration": {
"vnetwithDNSTemplateURL": "[concat(parameters('templatesBaseUrl'),'/vnet-with-dns-server.json')]",
"rdpIPAdressSetupURL": "[concat(parameters('templatesBaseUrl'),'/publicip-rdp.json')]",
"setupLBsUrl": "[concat(parameters('templatesBaseUrl'), '/setupLBs-e.json')]",
"creatingADNICUrl": "[concat(parameters('templatesBaseUrl'),'/creatingADNIC.json')]",
"creatingNicsUrl": "[concat(parameters('templatesBaseUrl'),'/creatingNICS.json')]",
"storageAccountVirtualNetworkPublicIP": "[concat(parameters('templatesBaseUrl'),'/storageAccountVirtualNetworkPublicIP.json')]",
"provisioningADVM": "[concat(parameters('templatesBaseUrl'),'/provisioningADVM','.json')]",
"provisioningSQLVMs": "[concat(parameters('templatesBaseUrl'),'/provisioningVM',variables('vmSettings').numberOfSqlVMDisks,'.json')]",
"configuringBackupADVM": "[concat(parameters('templatesBaseUrl'),'/configuringBackupADVM.json')]",
"preparingAlwaysOnSqlServer": "[concat(parameters('templatesBaseUrl'),'/preparingSqlServer.json')]",
"configuringAlwaysOn": "[concat(parameters('templatesBaseUrl'),'/configuringAlwaysOn.json')]",
"adPDCModulesURL": "[concat(parameters('scriptsBaseUrl'),'/CreateADPDC.ps1.zip')]",
"adPDCConfigurationFunction": "CreateADPDC.ps1\\CreateADPDC",
"adBDCModulesURL": "[concat(parameters('scriptsBaseUrl'),'/CreateADBDC.ps1.zip')]",
"adBDCConfigurationFunction": "CreateADBDC.ps1\\CreateADBDC",
"fswModulesURL": "[concat(parameters('scriptsBaseUrl'),'/CreateFileShareWitness.ps1.zip')]",
"fswConfigurationFunction": "CreateFileShareWitness.ps1\\CreateFileShareWitness",
"sqlAOPrepareModulesURL": "[concat(parameters('scriptsBaseUrl'),'/PrepareAlwaysOnSqlServer.ps1.zip')]",
"sqlAOPrepareConfigurationFunction": "PrepareAlwaysOnSqlServer.ps1\\PrepareAlwaysOnSqlServer",
"createClusterModulesURL": "[concat(parameters('scriptsBaseUrl'),'/CreateFailoverCluster.ps1.zip')]",
"createClusterConfigurationFunction": "CreateFailoverCluster.ps1\\CreateFailoverCluster"
}
},
"resources": [
{
"name": "[variables('nsgName')]",
"location": "[resourceGroup().location]",
"type": "Microsoft.Network/networkSecurityGroups",
"apiVersion": "2015-06-15",
"properties": {
"securityRules": [
{
"name": "rule1",
"properties": {
"protocol": "*",
"sourcePortRange": "*",
"destinationPortRange": "*",
"sourceAddressPrefix": "*",
"destinationAddressPrefix": "*",
"access": "Allow",
"priority": 101,
"direction": "Inbound"
}
}
]
}
},
{
"name": "StorageAccountVirtualNetworkPublicIP",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"comments": "This resource will create storage accounts for Active Directory, SQL Server, File Share Witness and Diagnostics. It will also create the Virtual Network and public IP addresses",
"dependsOn": [
"[variables('nsgID')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').storageAccountVirtualNetworkPublicIP]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"location": {
"value": "[resourceGroup().location]"
},
"sqlStorageAccountName": {
"value": "[parameters('sqlStorageAccountName')]"
},
"dcStorageAccountName": {
"value": "[variables('dcStorageAccountName')]"
},
"SqlStorageAccountType": {
"value": "[parameters('sqlStorageAccountType')]"
},
"DcStorageAccountType": {
"value": "[variables('dcStorageAccountType')]"
},
"primaryDCIPAddressNameWithSuffix": {
"value": "[variables('primaryDCIPAddressNameWithSuffix')]"
},
"sqlVMName": {
"value": "[variables('vmSettings').sqlVMName]"
},
"sql1AddressNameWithSuffix": {
"value": "[variables('sql1AddressNameWithSuffix')]"
},
"sql0AddressNameWithSuffix": {
"value": "[variables('sql0AddressNameWithSuffix')]"
},
"virtualNetworkName": {
"value": "[variables('virtualNetworkNameWithSuffix')]"
},
"virtualNetworkAddressRange": {
"value": "[parameters('virtualNetworkAddressRange')]"
},
"subnets": {
"value": "[variables('subnets')]"
},
"nsgID": {
"value": "[variables('nsgID')]"
},
"dnsSuffix": {
"value": "[parameters('dnsSuffix')]"
}
}
}
},
{
"name": "[variables('publicIPAddressName')]",
"type": "Microsoft.Network/publicIPAddresses",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"Microsoft.Resources/deployments/StorageAccountVirtualNetworkPublicIP"
],
"properties": {
"publicIPAllocationMethod": "Static",
"dnsSettings": {
"domainNameLabel": "[variables('dnsPrefix')]",
"reverseFqdn": "[concat(variables('dnsPrefix'), '.', resourceGroup().location, '.cloudapp.', parameters('dnsSuffix'))]"
}
}
},
{
"name": "LoadBalancers",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"comments": "Create Load Balancers for SQL",
"dependsOn": [
"[variables('ids').publicIPAddressID]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').setupLBsUrl]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"location": {
"value": "[resourceGroup().location]"
},
"sqlLBName": {
"value": "[variables('lbSettings').sqlLBName]"
},
"sqlLBFE": {
"value": "[variables('lbSettings').sqlLBFE]"
},
"sqlLBIPAddress": {
"value": "[variables('ids').publicIPAddressID]"
},
"staticSubnetRef": {
"value": "[variables('sqlSubnetRef')]"
},
"sqlLBBE": {
"value": "[variables('lbSettings').sqlLBBE]"
},
"sqlLBBEID": {
"value": "[variables('derivedIds').sqlBEAddressPoolID]"
},
"sqllbFEConfigID": {
"value": "[variables('derivedIds').sqllbFEConfigID]"
},
"sqllbProbeID": {
"value": "[variables('derivedIds').sqllbProbeID]"
},
"SQLAOProbe": {
"value": "[variables('SQLAOProbe')]"
}
}
}
},
{
"name": "CreatingADNetworkInterface",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/LoadBalancers"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').creatingADNICUrl]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"location": {
"value": "[resourceGroup().location]"
},
"adPDCNicName": {
"value": "[variables('adPDCNicName')]"
},
"adPDCNICIPAddress": {
"value": "[parameters('adPDCNICIPAddress')]"
},
"staticSubnetRef": {
"value": "[variables('staticSubnetRef')]"
},
"adBEAddressPoolID": {
"value": "[variables('derivedIds').adBEAddressPoolID]"
},
"adRDPNATRuleID": {
"value": "[variables('derivedIds').adRDPNATRuleID]"
},
"primaryDCIPAddressNameWithSuffix": {
"value": "[variables('primaryDCIPAddressNameWithSuffix')]"
}
}
}
},
{
"name": "ProvisioningADVM",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/CreatingADNetworkInterface"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').provisioningADVM]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"adPDCVMName": {
"value": "[variables('vmSettings').adPDCVMName]"
},
"adAvailabilitySetName": {
"value": "[variables('vmSettings').availabilitySets.adAvailabilitySetName]"
},
"dcStorageAccountName": {
"value": "[variables('dcStorageAccountName')]"
},
"sqlStorageAccountName": {
"value": "[parameters('sqlStorageAccountName')]"
},
"location": {
"value": "[resourceGroup().location]"
},
"adVMSize": {
"value": "[parameters('adVMSize')]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"adImagePublisher": {
"value": "[variables('vmSettings').windowsImagePublisher]"
},
"adImageOffer": {
"value": "[variables('vmSettings').windowsImageOffer]"
},
"adImageSKU": {
"value": "[variables('vmSettings').windowsImageSKU]"
},
"vmContainerName": {
"value": "[variables('vmSettings').vmContainerName]"
},
"adPDCNicName": {
"value": "[variables('adPDCNicName')]"
},
"domainName": {
"value": "[parameters('domainName')]"
},
"adPDCConfigurationFunction": {
"value": "[variables('configuration').adPDCConfigurationFunction]"
},
"adPDCModulesURL": {
"value": "[variables('configuration').adPDCModulesURL]"
}
}
}
},
{
"name": "UpdatingDNStoPrimaryADVM",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/ProvisioningADVM"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').vnetwithDNSTemplateURL]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"location": {
"value": "[resourceGroup().location]"
},
"virtualNetworkName": {
"value": "[variables('virtualNetworkNameWithSuffix')]"
},
"virtualNetworkAddressRange": {
"value": "[parameters('virtualNetworkAddressRange')]"
},
"subnets": {
"value": "[variables('subnets')]"
},
"DNSServerAddress": {
"value": [
"[parameters('adPDCNICIPAddress')]"
]
}
}
}
},
{
"name": "CreatingNetworkInterfaces",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/UpdatingDNStoPrimaryADVM"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').creatingNicsUrl]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"location": {
"value": "[resourceGroup().location]"
},
"adPDCNICIPAddress": {
"value": "[parameters('adPDCNICIPAddress')]"
},
"sqlVMName": {
"value": "[variables('vmSettings').sqlVMName]"
},
"sqlSubnetRef": {
"value": "[variables('sqlSubnetRef')]"
},
"sqlBEAddressPoolID": {
"value": "[variables('derivedIds').sqlBEAddressPoolID]"
},
"sqlwNicName": {
"value": "[variables('sqlwNicName')]"
},
"sql1AddressNameWithSuffix": {
"value": "[variables('sql1AddressNameWithSuffix')]"
},
"sql0AddressNameWithSuffix": {
"value": "[variables('sql0AddressNameWithSuffix')]"
}
}
}
},
{
"name": "ProvisioningSQLVMs",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/CreatingNetworkInterfaces"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').provisioningSQLVMs]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"sqlAvailabilitySetName": {
"value": "[variables('vmSettings').availabilitySets.sqlAvailabilitySetName]"
},
"sqlStorageAccountName": {
"value": "[parameters('sqlStorageAccountName')]"
},
"location": {
"value": "[resourceGroup().location]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"vmContainerName": {
"value": "[variables('vmSettings').vmContainerName]"
},
"sqlVMName": {
"value": "[variables('vmSettings').sqlVMName]"
},
"sqlVMSize": {
"value": "[parameters('sqlVMSize')]"
},
"vmDiskSize": {
"value": "[parameters('vmDiskSize')]"
},
"fswImagePublisher": {
"value": "[variables('vmSettings').windowsImagePublisher]"
},
"fswImageOffer": {
"value": "[variables('vmSettings').windowsImageOffer]"
},
"fswImageSKU": {
"value": "[variables('vmSettings').windowsImageSKU]"
},
"sqlImagePublisher": {
"value": "[variables('vmSettings').sqlImagePublisher]"
},
"sqlImageOffer": {
"value": "[parameters('sqlServerVersion')]"
},
"sqlImageSKU": {
"value": "[variables(parameters('sqlServerVersion'))]"
},
"witnessVMSize": {
"value": "[parameters('witnessVMSize')]"
},
"sqlwVMName": {
"value": "[variables('vmSettings').sqlwVMName]"
},
"sqlwNicName": {
"value": "[variables('sqlwNicName')]"
}
}
}
},
{
"name": "PreparingAlwaysOnSqlServer",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/ProvisioningSQLVMs"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').preparingAlwaysOnSqlServer]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"sqlVMName": {
"value": "[variables('vmSettings').sqlVMName]"
},
"location": {
"value": "[resourceGroup().location]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"domainName": {
"value": "[parameters('domainName')]"
},
"sqlAOPrepareModulesURL": {
"value": "[variables('configuration').sqlAOPrepareModulesURL]"
},
"sqlAOPrepareConfigurationFunction": {
"value": "[variables('configuration').sqlAOPrepareConfigurationFunction]"
},
"sqlAOEPName": {
"value": "[variables('sqlAOEPName')]"
},
"sqlServerServiceAccountUserName": {
"value": "[parameters('sqlServerServiceAccountUserName')]"
},
"sqlServerServiceAccountPassword": {
"value": "[parameters('sqlServerServiceAccountPassword')]"
},
"sqlAuthUserName": {
"value": "[parameters('sqlAuthUserName')]"
},
"sqlAuthPassword": {
"value": "[parameters('sqlAuthPassword')]"
},
"sharePath": {
"value": "[variables('sharePath')]"
},
"adPDCVMName": {
"value": "[variables('vmSettings').adPDCVMName]"
},
"sqlwVMName": {
"value": "[variables('vmSettings').sqlwVMName]"
},
"fswModulesURL": {
"value": "[variables('configuration').fswModulesURL]"
},
"fswConfigurationFunction": {
"value": "[variables('configuration').fswConfigurationFunction]"
},
"autoPatchingDay": {
"value": "[parameters('autoPatchingDay')]"
},
"autoPatchingStartHour": {
"value": "[parameters('autoPatchingStartHour')]"
},
"autoPatchingEnable": {
"value": "[variables(parameters('autoPatchingDay'))]"
},
"numberOfDisks": {
"value": "[variables('vmSettings').numberOfSqlVMDisks]"
},
"workloadType": {
"value": "[parameters('workloadType')]"
}
}
}
},
{
"name": "ConfiguringAlwaysOn",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2015-01-01",
"dependsOn": [
"Microsoft.Resources/deployments/PreparingAlwaysOnSqlServer"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('configuration').configuringAlwaysOn]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"sqlVMName": {
"value": "[variables('vmSettings').sqlVMName]"
},
"location": {
"value": "[resourceGroup().location]"
},
"adminUsername": {
"value": "[parameters('adminUsername')]"
},
"adminPassword": {
"value": "[parameters('adminPassword')]"
},
"domainName": {
"value": "[parameters('domainName')]"
},
"sqlAOEPName": {
"value": "[variables('sqlAOEPName')]"
},
"sqlServerServiceAccountUserName": {
"value": "[parameters('sqlServerServiceAccountUserName')]"
},
"sqlServerServiceAccountPassword": {
"value": "[parameters('sqlServerServiceAccountPassword')]"
},
"createClusterModulesURL": {
"value": "[variables('configuration').createClusterModulesURL]"
},
"createClusterConfigurationFunction": {
"value": "[variables('configuration').createClusterConfigurationFunction]"
},
"clusterName": {
"value": "[variables('clusterName')]"
},
"sharePath": {
"value": "[variables('sharePath')]"
},
"sqlAOAGName": {
"value": "[parameters('sqlAOAGName')]"
},
"sqlAOListenerName": {
"value": "[parameters('sqlAOListenerName')]"
},
"sqlAOListenerPort": {
"value": "[parameters('sqlAOListenerPort')]"
},
"sqlLBName": {
"value": "[variables('lbSettings').sqlLBName]"
},
"sqlLBIPAddress": {
"value": "[reference(variables('ids').publicIPAddressID).ipAddress]"
},
"adPDCVMName": {
"value": "[variables('vmSettings').adPDCVMName]"
},
"sqlwVMName": {
"value": "[variables('vmSettings').sqlwVMName]"
},
"numberOfDisks": {
"value": "[variables('vmSettings').numberOfSqlVMDisks]"
},
"workloadType": {
"value": "[parameters('workloadType')]"
}
}
}
}
],
"outputs": {}
}