如何使用 ARM 模板启用 SQL 身份验证?

How to enable SQL Authentication with ARM Template?

我有一个 ARM 模板,它使用以下图像部署多个 Azure VM:

    "SQL2008R2SP3-WS2008R2SP1",
    "SQL2012SP4-WS2012R2",
    "SQL2014SP2-WS2012R2",
    "SQL2016SP2-WS2016",
    "SQL2017-WS2016"

SQLIaaS VM 扩展不会让 SQL 服务器处于 SQL 身份验证模式,也不会创建 SQL 身份验证帐户。否则其他一切正常。这是 ARM 模板的 SQLIaaS 部分的片段。为什么没有设置 SQL Auth 有什么想法吗?

{
      "apiVersion": "2015-06-15",
      "type": "Microsoft.Compute/virtualMachines/extensions",
      "name": "[concat(parameters('virtualMachineName'), copyIndex(1), '/SqlIaasExtension')]",
      "location": "[parameters('location')]",
      "condition": "[parameters('deploySqlIaasExtension')]",
      "tags": {
        "displayName": "SQLIaas VM Extension"
      },
      "dependsOn": [
        "[concat(parameters('virtualMachineName'),copyIndex(1))]",    
        "[concat('Microsoft.Storage/storageAccounts','/', variables('storageNameSQLBackups'))]"
      ],
      "copy": {
        "name": "virtualMachineExtensionsGroup",
        "count": "[parameters('sqlServerCount')]"
      },
      "properties": {
        "type": "SqlIaaSAgent",
        "publisher": "Microsoft.SqlServer.Management",
        "typeHandlerVersion": "1.2",
        "autoUpgradeMinorVersion": "true",
        "settings": {
          "AutoTelemetrySettings": {
            "Region": "[parameters('location')]"
          },
          "AutoPatchingSettings": {
            "PatchCategory": "WindowsMandatoryUpdates",
            "Enable": true,
            "DayOfWeek": "Sunday",
            "MaintenanceWindowStartingHour": "0",
            "MaintenanceWindowDuration": "240"
          },
          "AutoBackupSettings": {
            "Enable": true,
            "RetentionPeriod": "[parameters('sqlAutobackupRetentionPeriod')]",
            "EnableEncryption": false,
            "BackupSystemDbs": "[parameters('backupSystemDbs')]"
          },
          "ServerConfigurationsManagementSettings": {
            "SQLConnectivityUpdateSettings": {
              "ConnectivityType": "Public",
              "Port": "[parameters('sqlPortNumber')]"
            },
            "SQLWorkloadTypeUpdateSettings": {
              "SQLWorkloadType": "General"
            },
            "AdditionalFeaturesServerConfigurations": {
              "IsRServicesEnabled": "false"
            }
          },
          "protectedSettings": {
            "SQLAuthUpdateUserName": "[parameters('sqlAuthenticationLogin')]",
            "SQLAuthUpdatePassword": "[parameters('sqlAuthenticationPassword')]"
          }
        }
      }
    }

我从来没有弄清楚这个问题,但它现在正在工作。不确定这是否对任何人有帮助,但我想回答这个问题。