Skip to content

Instantly share code, notes, and snippets.

@ajomathew
Created May 24, 2020 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajomathew/a3bf1bc6ce00e9e6967af917ae20c222 to your computer and use it in GitHub Desktop.
Save ajomathew/a3bf1bc6ce00e9e6967af917ae20c222 to your computer and use it in GitHub Desktop.
ARM template to enable SQL VM using Microsoft.SqlVirtualMachine/SqlVirtualMachines
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sqlVirtualMachineLocation": {
"type": "string"
},
"sqlVirtualMachineName": {
"type": "string"
},
"sqlConnectivityType": {
"type": "string"
},
"sqlPortNumber": {
"type": "string"
},
"sqlStorageWorkloadType": {
"type": "string"
},
"sqlStorageDisksConfigurationType": {
"type": "string"
},
"sqlAutopatchingDayOfWeek": {
"type": "string"
},
"sqlAutopatchingStartHour": {
"type": "string"
},
"sqlAutopatchingWindowDuration": {
"type": "string"
},
"dataPath": {
"type": "string"
},
"dataDisksLUNs": {
"type": "array",
"defaultvalue": [
0
]
},
"logPath": {
"type": "string"
},
"logDisksLUNs": {
"type": "array",
"defaultvalue": [
0
]
},
"tempDbPath": {
"type": "string"
},
"rServicesEnabled": {
"type": "string"
}
},
"variables": {
},
"resources": [
{
"name": "[parameters('sqlVirtualMachineName')]",
"type": "Microsoft.SqlVirtualMachine/SqlVirtualMachines",
"apiVersion": "2017-03-01-preview",
"location": "[parameters('sqlVirtualMachineLocation')]",
"properties": {
"virtualMachineResourceId": "[resourceId('Microsoft.Compute/virtualMachines', parameters('sqlVirtualMachineName'))]",
"sqlManagement": "Full",
"SqlServerLicenseType": "PAYG",
"AutoPatchingSettings": {
"Enable": true,
"DayOfWeek": "[parameters('sqlAutopatchingDayOfWeek')]",
"MaintenanceWindowStartingHour": "[parameters('sqlAutopatchingStartHour')]",
"MaintenanceWindowDuration": "[parameters('sqlAutopatchingWindowDuration')]"
},
"KeyVaultCredentialSettings": {
"Enable": false,
"CredentialName": ""
},
"StorageConfigurationSettings": {
"DiskConfigurationType": "[parameters('sqlStorageDisksConfigurationType')]",
"StorageWorkloadType": "[parameters('sqlStorageWorkloadType')]",
"SQLDataSettings": {
"LUNs": "[parameters('dataDisksLUNs')]",
"DefaultFilePath": "[parameters('dataPath')]"
},
"SQLLogSettings": {
"LUNs": "[parameters('logDisksLUNs')]",
"DefaultFilePath": "[parameters('logPath')]"
},
"SQLTempDbSettings": {
"DefaultFilePath": "[parameters('tempDbPath')]"
}
},
"ServerConfigurationsManagementSettings": {
"SQLConnectivityUpdateSettings": {
"ConnectivityType": "[parameters('sqlConnectivityType')]",
"Port": "[parameters('sqlPortNumber')]",
"SQLAuthUpdateUserName": "",
"SQLAuthUpdatePassword": ""
},
"AdditionalFeaturesServerConfigurations": {
"IsRServicesEnabled": "[parameters('rServicesEnabled')]"
}
}
}
}
],
"outputs": {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment