У меня есть шаблон arm, который создает 2 сервера базы данных документов. Раздел шаблона ARM выглядит следующим образом:
{
"name": "[variables('sqlServerName')]",
"type": "Microsoft.DocumentDB/databaseAccounts",
"apiVersion": "2019-12-12",
"location": "[parameters('location')]",
"tags": {
"name": "Cosmos DB Account"
},
"properties": {
"locations": "[variables('locations')]",
"databaseAccountOfferType": "Standard"
}
},
{
"name": "[variables('sqlServerDevelopmentName')]",
"type": "Microsoft.DocumentDB/databaseAccounts",
"apiVersion": "2019-12-12",
"location": "[parameters('location')]",
"tags": {
"name": "Cosmos Development DB Account"
},
"properties": {
"locations": "[variables('locations')]",
"databaseAccountOfferType": "Standard"
}
},
{
"type": "Microsoft.DocumentDB/databaseAccounts/apis/databases",
"name": "[concat(variables('sqlServerName'), '/sql/', variables('name'))]",
"apiVersion": "2016-03-31",
"dependsOn": ["[resourceId('Microsoft.DocumentDB/databaseAccounts/', variables('sqlServerName'))]"],
"properties": {
"resource": {
"name": "[variables('liveName')]"
},
"options": {
"throughput": "[variables('cosmosThroughPut')]"
}
}
},
{
"type": "Microsoft.DocumentDB/databaseAccounts/apis/databases",
"name": "[concat(variables('sqlServerDevelopmentName'), '/sql/', variables('name'))]",
"apiVersion": "2016-03-31",
"dependsOn": ["[resourceId('Microsoft.DocumentDB/databaseAccounts/', variables('sqlServerDevelopmentName'))]"],
"properties": {
"resource": {
"name": "[variables('developmentName')]"
},
"options": {
"throughput": "[variables('cosmosDevelopThroughPut')]"
}
}
},
{
"name": "[concat(variables('sqlServerName'), '/sql/', variables('name'), '/', variables('cosmosContainerName'))]",
"type": "Microsoft.DocumentDb/databaseAccounts/apis/databases/containers",
"apiVersion": "2016-03-31",
"dependsOn": ["[resourceId('Microsoft.DocumentDB/databaseAccounts/apis/databases', variables('sqlServerName'), 'sql', variables('name'))]"],
"properties": {
"resource": {
"name": "[variables('cosmosContainerName')]",
"partitionKey": {
"paths": [
"/categoryId"
],
"kind": "Hash"
},
"indexingPolicy": {
"indexingMode": "consistent",
"includedPaths": [{
"path": "/*"
}]
}
}
}
},
{
"name": "[concat(variables('sqlServerDevelopmentName'), '/sql/', variables('name'), '/', variables('cosmosContainerName'))]",
"type": "Microsoft.DocumentDb/databaseAccounts/apis/databases/containers",
"apiVersion": "2016-03-31",
"dependsOn": ["[resourceId('Microsoft.DocumentDB/databaseAccounts/apis/databases', variables('sqlServerDevelopmentName'), 'sql', variables('name'))]"],
"properties": {
"resource": {
"name": "[variables('cosmosContainerName')]",
"partitionKey": {
"paths": [
"/categoryId"
],
"kind": "Hash"
},
"indexingPolicy": {
"indexingMode": "consistent",
"includedPaths": [{
"path": "/*"
}]
}
}
}
}
И переменные выглядят так:
"name": "sxp",
"sqlServerName": "[variables('liveName')]",
"sqlServerDevelopmentName": "[variables('developmentName')]",
"sxpDatabaseName": "[variables('name')]",
"cosmosContainerName": "products",
"cosmosThroughPut": "400",
"cosmosDevelopThroughPut": "400",
Когда я запускаю свой релиз, я получаю эту ошибку (для обоих серверов DocumentDb) :
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "BadRequest",
"message": "Message: {\"code\":\"BadRequest\",\"message\":\"Message: {\\\"partitionCount\\\":1}\\r\\nActivityId: b0751976-2076-4f29-93ab-b3d5849390b8, Request URI: /apps/0ccd856f-da7a-4ff9-a530-88ce0dbfd50c/services/b3350877-fd5e-4ea1-b6ee-41ecb9fb2540/partitions/14300278-223a-4614-afca-48f66e186695/replicas/132272757678585484p, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.9.2\"}, Request URI: /dbs, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2, Microsoft.Azure.Documents.Common/2.9.2"
}
]
}
}
Что для меня абсолютно ничего не значит. Я попытался найти его, но не могу найти ссылку на ошибку. Странно то, что он создает ресурсы и их можно использовать, но при развертывании говорится, что это не удалось.
Кто-нибудь видел эту проблему раньше?