question

DonovinDeCosteddecoste-5893 avatar image
0 Votes"
DonovinDeCosteddecoste-5893 asked soysoliscarlos commented

SqlIaasExtension in ARM template intermittently configures SQL Authentication

Hi there,

We have had an ARM template using SQLIassExtension to configure a SQL VM for many years. Recently what we are observing is sometimes SQL Authentication is being enabled and other times it is being disabled using the exact same template with no changes. We need this to be enabled and consistently be enabled on creation.

217677-image.png

I tried several things including updating the extension api from the 2015 version to apiVersion 2020-12-01 with no success. I've attached both versions of the arm template below to show that both instanced were unsuccessful and showed the same behavior.

Below is a copy of the older ARM template used

============================
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('vmSQLName'), '/SqlIaasExtension')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', variables('vmSQLName'))]"
],
"properties": {
"type": "SqlIaaSAgent",
"publisher": "Microsoft.SqlServer.Management",
"typeHandlerVersion": "1.2",
"autoUpgradeMinorVersion": "true",
"settings": {
"AutoTelemetrySettings": {
"Region": "[resourceGroup().location]"
},
"AutoPatchingSettings": {
"PatchCategory": "WindowsMandatoryUpdates",
"Enable": true,
"DayOfWeek": "Sunday",
"MaintenanceWindowStartingHour": "2",
"MaintenanceWindowDuration": "60"
},
"KeyVaultCredentialSettings": {
"Enable": false,
"CredentialName": ""
},
"ServerConfigurationsManagementSettings": {
"SQLConnectivityUpdateSettings": {
"ConnectivityType": "Private",
"Port": "1433"
},
"SQLWorkloadTypeUpdateSettings": {
"SQLWorkloadType": "GENERAL"
},
"SQLStorageUpdateSettings": {
"DiskCount": "1",
"NumberOfColumns": "1",
"StartingDeviceID": "2",
"DiskConfigurationType": "NEW"
},
"AdditionalFeaturesServerConfigurations": {
"IsRServicesEnabled": "false"
}
}
},
"protectedSettings": {
"SQLAuthUpdateUserName": "[parameters('adminUsername')]",
"SQLAuthUpdatePassword": "[parameters('adminPassword')]"
}
},
"tags": {
"displayName": "AddSQLServerDisk"
}
},
============================================

and below is the newer API used with additional settings under the ServerConfigurationsManagementSettings area

============================================
{
"apiVersion": "2020-12-01",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('vmSQLName'), '/SqlIaasExtension')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines', variables('vmSQLName'))]"
],
"properties": {
"type": "SqlIaaSAgent",
"publisher": "Microsoft.SqlServer.Management",
"typeHandlerVersion": "1.2",
"autoUpgradeMinorVersion": "true",
"settings": {
"AutoTelemetrySettings": {
"Region": "[resourceGroup().location]"
},
"AutoPatchingSettings": {
"PatchCategory": "WindowsMandatoryUpdates",
"Enable": true,
"DayOfWeek": "Sunday",
"MaintenanceWindowStartingHour": "2",
"MaintenanceWindowDuration": "60"
},
"KeyVaultCredentialSettings": {
"Enable": false,
"CredentialName": ""
},
"ServerConfigurationsManagementSettings": {
"SQLConnectivityUpdateSettings": {
"SqlAuthUpdateUserName": "[parameters('adminUsername')]",
"SqlAuthUpdatePassword": "[parameters('adminPassword')]",
"ConnectivityType": "Private",
"Port": "1433"
},
"SQLWorkloadTypeUpdateSettings": {
"SQLWorkloadType": "GENERAL"
},
"SQLStorageUpdateSettings": {
"DiskCount": "1",
"NumberOfColumns": "1",
"StartingDeviceID": "2",
"DiskConfigurationType": "NEW"
},
"AdditionalFeaturesServerConfigurations": {
"IsRServicesEnabled": "false"
}
}
},
"protectedSettings": {
"SQLAuthUpdateUserName": "[parameters('adminUsername')]",
"SQLAuthUpdatePassword": "[parameters('adminPassword')]"
}
},
"tags": {
"displayName": "AddSQLServerDisk"
}
},
================================================


azure-sql-virtual-machines
image.png (6.1 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for asking this question on the Microsoft Q&A Platform.

You have not received answers or comments to your question because it may be ambiguous or confusing.

I recommend you visit How to write a quality question and verify that your question meets some of the recommendations.

Hope this helps,
Carlos Solís Salazar


NOTE: To answer you as quickly as possible, please mention me in your reply.


0 Votes 0 ·

0 Answers