Сбой развертывания группы ресурсов Azure - PullRequest
0 голосов
/ 28 сентября 2019

У меня есть проект развертывания группы ресурсов Azure в Visual Studio 2019, который корректно проверяет и развертывает из Visual Studio, однако, когда я пытаюсь развернуть его через конвейер выпуска Azure с помощью задачи развертывания группы ресурсов Azure, он периодически завершается с ошибкой:

Содержимое запроса недопустимо и не может быть десериализовано: тип «Обязательное свойство» не найден в JSON.Путь 'properties.template.resources [6]', строка 1, позиция 3759. '.Не удалось выполнить задачу при создании или обновлении шаблона.

Мне не удалось найти какую-либо полезную информацию в моем исследовании проблемы.Вот шаблон:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "sql_name": {
      "defaultValue": "project-sql",
      "type": "String"
    },
    "name": {
      "defaultValue": "a-data-factory",
      "type": "String"
    },
    "location": {
      "defaultValue": "Central US",
      "type": "String"
    },
    "apiVersion": {
      "defaultValue": "2018-06-01",
      "type": "String"
    },
    "gitAccountName": {
      "type": "String"
    },
    "gitRepositoryName": {
      "type": "String"
    },
    "gitBranchName": {
      "defaultValue": "foo-branch",
      "type": "String"
    },
    "gitRootFolder": {
      "defaultValue": "/",
      "type": "String"
    },
    "gitProjectName": {
      "type": "String"
    },
    "ssisdbname": {
      "type": "String",
      "defaultValue": "SSISDB"
    },
    "factoryName": {
      "type": "string",
      "metadata": "Data Factory Name",
      "defaultValue": "a-data-factory"
    }
  },
  "variables": {
    "factoryId": "[concat('Microsoft.DataFactory/factories/', parameters('factoryName'))]"
  },
  "resources": [
    {
      "type": "Microsoft.Sql/servers",
      "apiVersion": "2015-05-01-preview",
      "name": "[parameters('sql_name')]",
      "location": "northcentralus",
      "kind": "v12.0",
      "properties": {
        "administratorLogin": "theadmin",
        "administratorLoginPassword": "",
        "version": "12.0"
      }
    },
    {
      "type": "Microsoft.Sql/servers/databases",
      "apiVersion": "2017-03-01-preview",
      "name": "[concat(parameters('sql_name'), '/dummyDB')]",
      "location": "northcentralus",
      "dependsOn": [
        "[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
      ],
      "sku": {
        "name": "S0",
        "tier": "Standard"
      },
      "kind": "v12.0,user",
      "properties": {
        "collation": "SQL_Latin1_General_CP1_CI_AS",
        "maxSizeBytes": 268435456000,
        "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
        "zoneRedundant": false
      }
    },
    {
      "type": "Microsoft.Sql/servers/databases",
      "apiVersion": "2017-03-01-preview",
      "name": "[concat(parameters('sql_name'), '/dummerDB')]",
      "location": "northcentralus",
      "dependsOn": [
        "[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
      ],
      "sku": {
        "name": "S0",
        "tier": "Standard"
      },
      "kind": "v12.0,user",
      "properties": {
        "collation": "SQL_Latin1_General_CP1_CI_AS",
        "maxSizeBytes": 268435456000,
        "catalogCollation": "SQL_Latin1_General_CP1_CI_AS",
        "zoneRedundant": false
      }
    },
    {
      "type": "Microsoft.Sql/servers/encryptionProtector",
      "apiVersion": "2015-05-01-preview",
      "name": "[concat(parameters('sql_name'), '/current')]",
      "dependsOn": [
        "[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
      ],
      "kind": "servicemanaged",
      "properties": {
        "serverKeyName": "ServiceManaged",
        "serverKeyType": "ServiceManaged"
      }
    },
    {
      "type": "Microsoft.Sql/servers/firewallRules",
      "apiVersion": "2015-05-01-preview",
      "name": "[concat(parameters('sql_name'), '/AllowAllWindowsAzureIps')]",
      "dependsOn": [
        "[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]"
      ],
      "properties": {
        "startIpAddress": "0.0.0.0",
        "endIpAddress": "0.0.0.0"
      }
    },
    {
      "type": "Microsoft.DataFactory/factories",
      "apiVersion": "[parameters('apiVersion')]",
      "name": "[parameters('factoryName')]",
      "location": "[parameters('location')]",
      "identity": {
        "type": "SystemAssigned"
      },
      "resources": [
        {
          "name": "[concat(parameters('factoryName'), '/theIntegrationRuntime1')]",
          "type": "Microsoft.DataFactory/factories/integrationRuntimes",
          "apiVersion": "2018-06-01",
          "properties": {
            "type": "Managed",
            "typeProperties": {
              "computeProperties": {
                "location": "Central US",
                "nodeSize": "Standard_D2_v3",
                "numberOfNodes": 1,
                "maxParallelExecutionsPerNode": 2
              },
              "ssisProperties": {
                "catalogInfo": {
                  "catalogServerEndpoint": "project-sql.database.windows.net",
                  "catalogAdminUserName": "theadmin",
                  "catalogAdminPassword": {
                    "type": "SecureString",
                    "value": ""
                  },
                  "catalogPricingTier": "S0"
                },
                "edition": "Standard",
                "licenseType": "LicenseIncluded"
              }
            }
          },
          "dependsOn": [ "[resourceId('Microsoft.DataFactory/factories', parameters('factoryname'))]" ]
        }
      ],
      "properties": {
        "repoConfiguration": {
          "type": "FactoryVSTSConfiguration",
          "accountName": "[parameters('gitAccountName')]",
          "repositoryName": "[parameters('gitRepositoryName')]",
          "collaborationBranch": "[parameters('gitBranchName')]",
          "rootFolder": "[parameters('gitRootFolder')]",
          "projectName": "[parameters('gitProjectName')]"
        }
      },
      "dependsOn": [ "[resourceId('Microsoft.Sql/servers', parameters('sql_name'))]" ]
    }
  ]
}

1 Ответ

0 голосов
/ 29 сентября 2019

Конвейер выпуска был указан для старого артефакта сборки с искаженным шаблоном.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...