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

问题描述 投票:0回答:1

我正在尝试将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')]"
              }
            }
          }
        }
sql-server arm-template
1个回答
0
投票

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

{
   ...
   "properties": {
       ...
       "settings": {
           ...
       },
       "protectedSettings": {
           "SQLAuthUpdateUserName": "[parameters('admin.username')]",
           "SQLAuthUpdatePassword": "[parameters('admin.password')]"
       }
   }
}
© www.soinside.com 2019 - 2024. All rights reserved.