如何使用SqlIaasExtension扩展启用SQL身份验证

时间:2019-02-15 18:57:19

标签: sql-server arm-template

我正在尝试配置SqlIaasExtension扩展,以后期配置SQL Server VM以使用SQL身份验证,同时还指定sqlUser和sqlPassword。扩展的部署成功,但是从未启用SQL身份验证方法。我似乎找不到资源管理器文档,该文档可能有助于告诉我我所缺少的内容。似乎另一个人也有类似的问题,但问题得以解决(我没有)。

How to enable SQL Authentication with ARM Template?

{
          "apiVersion": "2015-06-15",
          "type": "extensions",
          "name": "SqlIaasExtension",
          "location": "[resourceGroup().location]",
          "condition": "[parameters('deployVMs')]",
          "tags": {
            "displayName": "SQLIaas VM Extension"
          },
          "dependsOn": [
            "[concat('vm-ssis-', parameters('environment.prefix'))]"
          ],
          "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": "0",
                "MaintenanceWindowDuration": "240"
              },
              "ServerConfigurationsManagementSettings": {
                "SQLConnectivityUpdateSettings": {
                  "ConnectivityType": "Private",
                  "Port": "1433",
                  "SQLAuthUpdateUserName": "[parameters('admin.username')]",
                  "SQLAuthUpdatePassword": "[parameters('admin.password')]"
                },
                "SQLWorkloadTypeUpdateSettings": {
                  "SQLWorkloadType": "General"
                },
                "AdditionalFeaturesServerConfigurations": {
                  "IsRServicesEnabled": "false"
                }
              },
              "protectedSettings": {
                "SQLAuthUpdateUserName": "[parameters('admin.username')]",
                "SQLAuthUpdatePassword": "[parameters('admin.password')]"
              }
            }
          }
        }

1 个答案:

答案 0 :(得分:0)

发生了同样的问题,因为我将“ protectedSettings”部分放在错误的位置。 “ protectedSettings”部分是“ settings”部分的兄弟,而不是子级。

{
   ...
   "properties": {
       ...
       "settings": {
           ...
       },
       "protectedSettings": {
           "SQLAuthUpdateUserName": "[parameters('admin.username')]",
           "SQLAuthUpdatePassword": "[parameters('admin.password')]"
       }
   }
}