From 9a688153b415abff6bb07fee3133dd67b2634b40 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Tue, 21 Jun 2022 17:56:10 +0200 Subject: [PATCH 1/7] feat(document-db): Added CosmosDB Gremlin API and updated mongodb to current version --- .../databaseAccounts/deploy.bicep | 43 ++++- .../gremlinDatabases/deploy.bicep | 96 ++++++++++ .../gremlinDatabases/graphs/deploy.bicep | 110 +++++++++++ .../gremlinDatabases/graphs/readme.md | 123 ++++++++++++ .../gremlinDatabases/graphs/version.json | 4 + .../gremlinDatabases/readme.md | 178 ++++++++++++++++++ .../gremlinDatabases/readme.old.md | 90 +++++++++ .../gremlinDatabases/version.json | 4 + .../databaseAccounts/readme.md | 67 +++++++ 9 files changed, 711 insertions(+), 4 deletions(-) create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/version.json create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/version.json diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index 1f603356aa..6a1b2f618e 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -50,8 +50,9 @@ param maxIntervalInSeconds int = 300 '3.2' '3.6' '4.0' + '4.2' ]) -param serverVersion string = '4.0' +param serverVersion string = '4.2' @description('Optional. SQL Databases configurations.') param sqlDatabases array = [] @@ -59,6 +60,9 @@ param sqlDatabases array = [] @description('Optional. MongoDB Databases configurations.') param mongodbDatabases array = [] +@description('Optional. Gremlin Databases configurations.') +param gremlinDatabases array = [] + @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') param enableDefaultTelemetry bool = true @@ -125,6 +129,16 @@ param diagnosticMetricsToEnable array = [ @description('Optional. The name of the diagnostic setting, if deployed.') param diagnosticSettingsName string = '${name}-diagnosticSettings' +@allowed([ + 'EnableCassandra' + 'EnableTable' + 'EnableGremlin' + 'EnableMongo' + 'DisableRateLimitingResponses' + 'EnableServerless' +]) +param capabilitiesToAdd array = [] + var diagnosticsLogs = [for category in diagnosticLogCategoriesToEnable: { category: category enabled: true @@ -177,25 +191,36 @@ var databaseAccount_locations = [for location in locations: { locationName: location.locationName }] -var kind = !empty(sqlDatabases) ? 'GlobalDocumentDB' : (!empty(mongodbDatabases) ? 'MongoDB' : 'Parse') +var kind = !empty(sqlDatabases) || !empty(gremlinDatabases) ? 'GlobalDocumentDB' : (!empty(mongodbDatabases) ? 'MongoDB' : 'Parse') var enableReferencedModulesTelemetry = false +var capabilities = [for capability in capabilitiesToAdd: { + name: capability +}] + var databaseAccount_properties = !empty(sqlDatabases) ? { consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] locations: databaseAccount_locations databaseAccountOfferType: databaseAccountOfferType enableAutomaticFailover: automaticFailover -} : (!empty(mongodbDatabases) ? { + capabilities: capabilities +} : !empty(mongodbDatabases) ? { consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] locations: databaseAccount_locations databaseAccountOfferType: databaseAccountOfferType apiProperties: { serverVersion: serverVersion } + capabilities: capabilities +} : !empty(gremlinDatabases) ? { + consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] + locations: databaseAccount_locations + databaseAccountOfferType: databaseAccountOfferType + capabilities: capabilities } : { databaseAccountOfferType: databaseAccountOfferType -}) +} resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' @@ -271,6 +296,16 @@ module mongodbDatabases_resource 'mongodbDatabases/deploy.bicep' = [for mongodbD } }] +module gremlinDatabases_resource 'gremlinDatabases/deploy.bicep' = [for gremlinDatabase in gremlinDatabases: { + name: '${uniqueString(deployment().name, location)}-mongodb-${gremlinDatabase.name}' + params: { + databaseAccountName: databaseAccount.name + name: gremlinDatabase.name + graphs: contains(gremlinDatabase, 'graphs') ? gremlinDatabase.graphs : [] + enableDefaultTelemetry: enableReferencedModulesTelemetry + } +}] + @description('The name of the database account.') output name string = databaseAccount.name diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep new file mode 100644 index 0000000000..9406fe9da6 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep @@ -0,0 +1,96 @@ +@description('Required. Name of the Gremlin database.') +param name string + +@description('Optional. Tags of the Gremlin database resource.') +param tags object = {} + +@description('Optional. Enables system assigned managed identity on the resource.') +param systemAssignedIdentity bool = false + +@description('Optional. The ID(s) to assign to the resource.') +param userAssignedIdentities object = {} + +@description('Conditional. The name of the parent Gremlin database. Required if the template is used in a standalone deployment.') +param databaseAccountName string + +@description('Optional. Array of graphs to deploy in the SQL database.') +param graphs array = [] + +@description('Optional. Represents maximum throughput, the resource can scale up to.') +param maxThroughput int = 0 + +@description('Optional. Request Units per second. For example, "throughput": 10000.') +param throughput int = 0 + +@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') +param enableDefaultTelemetry bool = false + +var enableReferencedModulesTelemetry = false + +var identityType = systemAssignedIdentity ? (!empty(userAssignedIdentities) ? 'SystemAssigned, UserAssigned' : 'SystemAssigned') : (!empty(userAssignedIdentities) ? 'UserAssigned' : 'None') + +var identity = identityType != 'None' ? { + type: identityType + userAssignedIdentities: !empty(userAssignedIdentities) ? userAssignedIdentities : null +} : null + +resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { + name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + } + } +} + +resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-preview' existing = { + name: databaseAccountName +} + +resource gremlinDatabase 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases@2022-02-15-preview' = { + name: name + tags: tags + parent: databaseAccount + identity: identity + properties: { + options: { + autoscaleSettings: { + maxThroughput: maxThroughput == 0 ? null : maxThroughput + } + throughput: throughput == 0 ? null : throughput + } + resource: { + id: name + } + } +} + +module gremlinGraphs 'graphs/deploy.bicep' = [for graph in graphs: { + name: '${uniqueString(deployment().name, gremlinDatabase.name)}-sqldb-${graph.name}' + params: { + name: graph.name + gremlinDatabaseName: name + databaseAccountName: databaseAccountName + kind: !empty(graph.kind) ? graph.kind : null + enableDefaultTelemetry: enableReferencedModulesTelemetry + automaticIndexing: !empty(graph.automaticIndexing) ? graph.automaticIndexing : null + indexingMode: !empty(graph.indexingMode) ? graph.indexingMode : null + indexingPaths: !empty(graph.indexingPaths) ? graph.indexingPaths : null + partitionKeyPaths: !empty(graph.partitionKeyPaths) ? graph.partitionKeyPaths : null + maxThroughput: !empty(graph.maxThroughput) ? graph.maxThroughput : null + throughput: !empty(graph.throughput) ? graph.throughput : null + uniqueKeyPaths: !empty(graph.uniqueKeyPaths) ? graph.uniqueKeyPaths : null + } +}] + +@description('The name of the Gremlin database.') +output name string = gremlinDatabase.name + +@description('The resource ID of the Gremlin database.') +output resourceId string = gremlinDatabase.id + +@description('The name of the resource group the Gremlin database was created in.') +output resourceGroupName string = resourceGroup().name diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep new file mode 100644 index 0000000000..f40f2ededb --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep @@ -0,0 +1,110 @@ +@description('Required. Name of the graph.') +param name string + +@description('Optional. Tags of the Gremlin graph resource.') +param tags object = {} + +@description('Optional. Represents maximum throughput, the resource can scale up to.') +param maxThroughput int = 0 + +@description('Optional. Request Units per second. For example, "throughput": 10000.') +param throughput int = 0 + +@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') +param enableDefaultTelemetry bool = false + +@description('Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment.') +param databaseAccountName string + +@description('Conditional. The name of the parent Gremlin Database. Required if the template is used in a standalone deployment.') +param gremlinDatabaseName string + +@description('Optional. Indicates if the indexing policy is automatic.') +param automaticIndexing bool = true + +@allowed([ + 'consistent' + 'lazy' + 'none' +]) +@description('Optional. Indicates the indexing mode.') +param indexingMode string = 'consistent' + +@allowed([ + 'Hash' + 'MultiHash' + 'Range' +]) +@description('Optional. Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create.') +param kind string = 'Hash' + +@description('Optional. List of paths using which data within the container can be partitioned.') +param partitionKeyPaths array = [] + +@description('Optional. List of paths must be unique for each document in the Azure Cosmos DB service.') +param uniqueKeyPaths array = [] + +@description('Optional. List of paths to include in the indexing.') +param indexingPaths array = [] + +resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { + name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + } + } +} + +resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-preview' existing = { + name: databaseAccountName + + resource gremlinDatabase 'gremlinDatabases@2022-02-15-preview' existing = { + name: gremlinDatabaseName + } +} + +resource gremlinGraph 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs@2022-02-15-preview' = { + name: name + tags: tags + parent: databaseAccount::gremlinDatabase + properties: { + options: { + autoscaleSettings: { + maxThroughput: maxThroughput == 0 ? null : maxThroughput + } + throughput: throughput == 0 ? null : throughput + } + resource: { + id: name + indexingPolicy: { + automatic: automaticIndexing + indexingMode: indexingMode + includedPaths: !empty(indexingPaths) ? indexingPaths : null + } + partitionKey: { + kind: kind + paths: !empty(partitionKeyPaths) ? partitionKeyPaths : null + } + uniqueKeyPolicy: !empty(uniqueKeyPaths) ? { + uniqueKeys: [ + { + paths: uniqueKeyPaths + } + ] + } : null + } + } +} + +@description('The name of the graph.') +output name string = gremlinGraph.name + +@description('The resource ID of the graph.') +output resourceId string = gremlinGraph.id + +@description('The name of the resource group the graph was created in.') +output resourceGroupName string = resourceGroup().name diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md new file mode 100644 index 0000000000..a12f9a7467 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md @@ -0,0 +1,123 @@ +# DocumentDB DatabaseAccounts GremlinDatabases Graphs `[Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs]` + +This module deploys DocumentDB DatabaseAccounts GremlinDatabases Graphs. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases/graphs) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | Name of the graph. | + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `databaseAccountName` | string | The name of the parent Database Account. Required if the template is used in a standalone deployment. | +| `gremlinDatabaseName` | string | The name of the parent Gremlin Database. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Allowed Values | Description | +| :-- | :-- | :-- | :-- | :-- | +| `automaticIndexing` | bool | `True` | | Indicates if the indexing policy is automatic. | +| `enableDefaultTelemetry` | bool | `False` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `indexingMode` | string | `'consistent'` | `[consistent, lazy, none]` | Indicates the indexing mode. | +| `indexingPaths` | array | `[]` | | List of paths to include in the indexing. Sets the `includedPaths` property. | +| `kind` | string | `'Hash'` | `[Hash, MultiHash, Range]` | Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (up to three maximum) are supported for container create. | +| `maxThroughput` | int | `0` | | Represents maximum throughput, the resource can scale up to. | +| `partitionKeyPaths` | array | `[]` | | List of paths using which data within the container can be partitioned. | +| `tags` | object | `{object}` | | Tags of the Gremlin graph resource. | +| `throughput` | int | `0` | | Request Units per second. For example, "throughput": 10000. | +| `uniqueKeyPaths` | array | `[]` | | List of paths must be unique for each document in the Azure Cosmos DB service. | + + +### Parameter Usage: `tags` + +Tag names and tag values can be provided as needed. A tag can be left without a value. + +
+ +Parameter JSON format + +```json +"tags": { + "value": { + "Environment": "Non-Prod", + "Contact": "test.user@testcompany.com", + "PurchaseOrder": "1234", + "CostCenter": "7890", + "ServiceName": "DeploymentValidation", + "Role": "DeploymentValidation" + } +} +``` + +
+ +
+ +Bicep format + +```bicep +tags: { + Environment: 'Non-Prod' + Contact: 'test.user@testcompany.com' + PurchaseOrder: '1234' + CostCenter: '7890' + ServiceName: 'DeploymentValidation' + Role: 'DeploymentValidation' +} +``` + +
+

+ +### Parameter Usage: `indexingPaths`, `partitionKeyPaths`, `uniqueKeyPaths` + +Different kinds of paths can be provided as array of strings: + +

+ +Bicep format + +```bicep +graphs: [ + { + name: 'graph01' + automaticIndexing: true + partitionKeyPaths: [ + '/name' + ], + + } + { + name: 'graph02' + automaticIndexing: true + partitionKeyPaths: [ + '/address' + ] + } +] +``` + +
+

+ +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the graph. | +| `resourceGroupName` | string | The name of the resource group the graph was created in. | +| `resourceId` | string | The resource ID of the graph. | diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/version.json b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/version.json new file mode 100644 index 0000000000..56f8d9ca40 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/version.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "0.4" +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md new file mode 100644 index 0000000000..9567e1e86a --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md @@ -0,0 +1,178 @@ +# DocumentDB DatabaseAccounts GremlinDatabases `[Microsoft.DocumentDB/databaseAccounts/gremlinDatabases]` + +This module deploys a GremlinDB within a CosmosDB account. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases) | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases/graphs) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | Name of the Gremlin database. | + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `databaseAccountName` | string | The name of the parent Gremlin database. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `enableDefaultTelemetry` | bool | `False` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `graphs` | _[graphs](graphs/readme.md)_ array | `[]` | Array of graphs to deploy in the SQL database. | +| `maxThroughput` | int | `0` | Represents maximum throughput, the resource can scale up to. | +| `systemAssignedIdentity` | bool | `False` | Enables system assigned managed identity on the resource. | +| `tags` | object | `{object}` | Tags of the Gremlin database resource. | +| `throughput` | int | `0` | Request Units per second. For example, "throughput": 10000. | +| `userAssignedIdentities` | object | `{object}` | The ID(s) to assign to the resource. | + + +### Parameter Usage: `graphs` + +List of graph databaseAccounts + +

+ +Parameter JSON format + +```json +"mongodbDatabases": { + "value": [ + { + "name": "graph01", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/name" + ] + }, + { + "name": "graph02", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/name" + ] + } + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +graphs: [ + { + name: 'graph01' + automaticIndexing: true + partitionKeyPaths: [ + '/name' + ] + } + { + name: 'graph02' + automaticIndexing: true + partitionKeyPaths: [ + '/name' + ] + } +] +``` + +
+ +### Parameter Usage: `tags` + +Tag names and tag values can be provided as needed. A tag can be left without a value. + +
+ +Parameter JSON format + +```json +"tags": { + "value": { + "Environment": "Non-Prod", + "Contact": "test.user@testcompany.com", + "PurchaseOrder": "1234", + "CostCenter": "7890", + "ServiceName": "DeploymentValidation", + "Role": "DeploymentValidation" + } +} +``` + +
+ +
+ +Bicep format + +```bicep +tags: { + Environment: 'Non-Prod' + Contact: 'test.user@testcompany.com' + PurchaseOrder: '1234' + CostCenter: '7890' + ServiceName: 'DeploymentValidation' + Role: 'DeploymentValidation' +} +``` + +
+

+ +### Parameter Usage: `userAssignedIdentities` + +You can specify multiple user assigned identities to a resource by providing additional resource IDs using the following format: + +

+ +Parameter JSON format + +```json +"userAssignedIdentities": { + "value": { + "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001": {}, + "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002": {} + } +} +``` + +
+ +
+ +Bicep format + +```bicep +userAssignedIdentities: { + '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001': {} + '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002': {} +} +``` + +
+

+ +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the Gremlin database. | +| `resourceGroupName` | string | The name of the resource group the Gremlin database was created in. | +| `resourceId` | string | The resource ID of the Gremlin database. | diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md new file mode 100644 index 0000000000..3132e2367b --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md @@ -0,0 +1,90 @@ +# DocumentDB Database Account Gremlin databases `[Microsoft.DocumentDB/databaseAccounts/gremlinDatabases]` + +This module deploys a GremlinDB within a CosmosDB account. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases) | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases/collections) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | Name of the gremlin database. | + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `databaseAccountName` | string | The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `graphs` | _[collections](collections/readme.md)_ array | `[]` | Collections in the gremlin database. | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `tags` | object | `{object}` | Tags of the resource. | +| `throughput` | int | `400` | Name of the gremlin database. | + + +### Parameter Usage: `tags` + +Tag names and tag values can be provided as needed. A tag can be left without a value. + +

+ +Parameter JSON format + +```json +"tags": { + "value": { + "Environment": "Non-Prod", + "Contact": "test.user@testcompany.com", + "PurchaseOrder": "1234", + "CostCenter": "7890", + "ServiceName": "DeploymentValidation", + "Role": "DeploymentValidation" + } +} +``` + +
+ +
+ +Bicep format + +```bicep +tags: { + Environment: 'Non-Prod' + Contact: 'test.user@testcompany.com' + PurchaseOrder: '1234' + CostCenter: '7890' + ServiceName: 'DeploymentValidation' + Role: 'DeploymentValidation' +} +``` + +
+

+ +### Parameter Usage: `graphs` + +Please reference the documentation for [graphs](./graphs/readme.md) + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the gremlin database. | +| `resourceGroupName` | string | The name of the resource group the gremlin database was created in. | +| `resourceId` | string | The resource ID of the gremlin database. | diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/version.json b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/version.json new file mode 100644 index 0000000000..56f8d9ca40 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/version.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "0.4" +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/readme.md index 9fa1394988..43500f14ae 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/arm/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -299,6 +299,73 @@ mongodbDatabases: [ Please reference the documentation for [mongodbDatabases](./mongodbDatabases/readme.md) +### Parameter Usage: `gremlinDatabases` + +

+ +Parameter JSON format + +```json +"mongodbDatabases": { + "value": [ + { + "name": "graphDb01", + "graphs": [ + { + "name": "graph01", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/name" + ] + }, + { + "name": "graph02", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/name" + ] + } + ] + } + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +gremlinDatabases: [ + { + name: 'graphDb01' + graphs: [ + { + name: 'graph01' + automaticIndexing: true + partitionKeyPaths: [ + '/name' + ] + } + { + name: 'graph02' + automaticIndexing: true + partitionKeyPaths: [ + '/name' + ] + } + ] + } +] +``` + +
+

+ +Please reference the documentation for [gremlinDatabases](./gremlinDatabases/readme.md) + ### Parameter Usage: `roleAssignments` Create a role assignment for the given resource. If you want to assign a service principal / managed identity that is created in the same deployment, make sure to also specify the `'principalType'` parameter and set it to 'ServicePrincipal'. This will ensure the role assignment waits for the principal's propagation in Azure. From 4c30f6727c12d8a143e2181e21ad13d0e5cf696c Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Tue, 21 Jun 2022 19:29:56 +0200 Subject: [PATCH 2/7] docs(graphs): Updated readme.md --- .../gremlinDatabases/readme.md | 2 +- .../gremlinDatabases/readme.old.md | 90 ------------------- 2 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md index 9567e1e86a..0e980359e0 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.md @@ -48,7 +48,7 @@ List of graph databaseAccounts

Parameter JSON format ```json -"mongodbDatabases": { +"graphs": { "value": [ { "name": "graph01", diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md deleted file mode 100644 index 3132e2367b..0000000000 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/readme.old.md +++ /dev/null @@ -1,90 +0,0 @@ -# DocumentDB Database Account Gremlin databases `[Microsoft.DocumentDB/databaseAccounts/gremlinDatabases]` - -This module deploys a GremlinDB within a CosmosDB account. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases) | -| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases/collections) | - -## Parameters - -**Required parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | Name of the gremlin database. | - -**Conditional parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `databaseAccountName` | string | The name of the parent Cosmos DB database account. Required if the template is used in a standalone deployment. | - -**Optional parameters** -| Parameter Name | Type | Default Value | Description | -| :-- | :-- | :-- | :-- | -| `graphs` | _[collections](collections/readme.md)_ array | `[]` | Collections in the gremlin database. | -| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `tags` | object | `{object}` | Tags of the resource. | -| `throughput` | int | `400` | Name of the gremlin database. | - - -### Parameter Usage: `tags` - -Tag names and tag values can be provided as needed. A tag can be left without a value. - -
- -Parameter JSON format - -```json -"tags": { - "value": { - "Environment": "Non-Prod", - "Contact": "test.user@testcompany.com", - "PurchaseOrder": "1234", - "CostCenter": "7890", - "ServiceName": "DeploymentValidation", - "Role": "DeploymentValidation" - } -} -``` - -
- -
- -Bicep format - -```bicep -tags: { - Environment: 'Non-Prod' - Contact: 'test.user@testcompany.com' - PurchaseOrder: '1234' - CostCenter: '7890' - ServiceName: 'DeploymentValidation' - Role: 'DeploymentValidation' -} -``` - -
-

- -### Parameter Usage: `graphs` - -Please reference the documentation for [graphs](./graphs/readme.md) - -## Outputs - -| Output Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The name of the gremlin database. | -| `resourceGroupName` | string | The name of the resource group the gremlin database was created in. | -| `resourceId` | string | The resource ID of the gremlin database. | From feca994b9d4c68c4a4efb87fd2740f91bdb2d6f5 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Tue, 21 Jun 2022 20:50:15 +0200 Subject: [PATCH 3/7] feat(document-db): Added backupPolicy, updated docs --- .../databaseAccounts/deploy.bicep | 52 ++++++++++++++++++- .../databaseAccounts/readme.md | 13 ++++- 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index 6a1b2f618e..ddbc05eec6 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -137,8 +137,41 @@ param diagnosticSettingsName string = '${name}-diagnosticSettings' 'DisableRateLimitingResponses' 'EnableServerless' ]) +@description('Optional. List of Cosmos DB capabilities for the account.') param capabilitiesToAdd array = [] +@allowed([ + 'Periodic' + 'Continuous' +]) +@description('Optional. Describes the mode of backups.') +param backupPolicyType string = 'Continuous' + +@allowed([ + 'Continuous30Days' + 'Continuous7Days' +]) +@description('Optional. Configuration values for continuous mode backup.') +param backupPolicyContinuousTier string = 'Continuous30Days' + +@minValue(60) +@maxValue(1440) +@description('Optional. An integer representing the interval in minutes between two backups. Only applies to periodic backup type.') +param backupIntervalInMinutes int = 240 + +@minValue(2) +@maxValue(720) +@description('Optional. An integer representing the time (in hours) that each backup is retained. Only applies to periodic backup type.') +param backupRetentionIntervalInHours int = 8 + +@allowed([ + 'Geo' + 'Local' + 'Zone' +]) +@description('Optional. Enum to indicate type of backup residency. Only applies to periodic backup type.') +param backupStorageRedundancy string = 'Local' + var diagnosticsLogs = [for category in diagnosticLogCategoriesToEnable: { category: category enabled: true @@ -199,12 +232,27 @@ var capabilities = [for capability in capabilitiesToAdd: { name: capability }] +var backupPolicy = backupPolicyType == 'Continuous' ? { + type: backupPolicyType + continuousModeProperties: { + tier: backupPolicyContinuousTier + } +} : { + type: backupPolicyType + periodicModeProperties: { + backupIntervalInMinutes: backupIntervalInMinutes + backupRetentionIntervalInHours: backupRetentionIntervalInHours + backupStorageRedundancy: backupStorageRedundancy + } +} + var databaseAccount_properties = !empty(sqlDatabases) ? { consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] locations: databaseAccount_locations databaseAccountOfferType: databaseAccountOfferType enableAutomaticFailover: automaticFailover capabilities: capabilities + backupPolicy: backupPolicy } : !empty(mongodbDatabases) ? { consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] locations: databaseAccount_locations @@ -213,11 +261,13 @@ var databaseAccount_properties = !empty(sqlDatabases) ? { serverVersion: serverVersion } capabilities: capabilities + backupPolicy: backupPolicy } : !empty(gremlinDatabases) ? { consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] locations: databaseAccount_locations databaseAccountOfferType: databaseAccountOfferType capabilities: capabilities + backupPolicy: backupPolicy } : { databaseAccountOfferType: databaseAccountOfferType } @@ -234,7 +284,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2021-06-15' = { +resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-preview' = { name: name location: location tags: tags diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/readme.md index 43500f14ae..990b601984 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/arm/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -15,7 +15,9 @@ This module deploys a DocumentDB database account and its child resources. | :-- | :-- | | `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) | | `Microsoft.Authorization/roleAssignments` | [2020-10-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-10-01-preview/roleAssignments) | -| `Microsoft.DocumentDB/databaseAccounts` | [2021-06-15](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2021-06-15/databaseAccounts) | +| `Microsoft.DocumentDB/databaseAccounts` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts) | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases) | +| `Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs` | [2022-02-15-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2022-02-15-preview/databaseAccounts/gremlinDatabases/graphs) | | `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases` | [2021-07-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2021-07-01-preview/databaseAccounts/mongodbDatabases) | | `Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections` | [2021-07-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2021-07-01-preview/databaseAccounts/mongodbDatabases/collections) | | `Microsoft.DocumentDB/databaseAccounts/sqlDatabases` | [2021-06-15](https://docs.microsoft.com/en-us/azure/templates/Microsoft.DocumentDB/2021-06-15/databaseAccounts/sqlDatabases) | @@ -34,6 +36,12 @@ This module deploys a DocumentDB database account and its child resources. | Parameter Name | Type | Default Value | Allowed Values | Description | | :-- | :-- | :-- | :-- | :-- | | `automaticFailover` | bool | `True` | | Enable automatic failover for regions. | +| `backupIntervalInMinutes` | int | `240` | | An integer representing the interval in minutes between two backups. Only applies to periodic backup type. | +| `backupPolicyContinuousTier` | string | `'Continuous30Days'` | `[Continuous30Days, Continuous7Days]` | Configuration values for continuous mode backup. | +| `backupPolicyType` | string | `'Continuous'` | `[Periodic, Continuous]` | Describes the mode of backups. | +| `backupRetentionIntervalInHours` | int | `8` | | An integer representing the time (in hours) that each backup is retained. Only applies to periodic backup type. | +| `backupStorageRedundancy` | string | `'Local'` | `[Geo, Local, Zone]` | Enum to indicate type of backup residency. Only applies to periodic backup type. | +| `capabilitiesToAdd` | array | `[]` | `[EnableCassandra, EnableTable, EnableGremlin, EnableMongo, DisableRateLimitingResponses, EnableServerless]` | List of Cosmos DB capabilities for the account. | | `databaseAccountOfferType` | string | `'Standard'` | `[Standard]` | The offer type for the Cosmos DB database account. | | `defaultConsistencyLevel` | string | `'Session'` | `[Eventual, ConsistentPrefix, Session, BoundedStaleness, Strong]` | The default consistency level of the Cosmos DB account. | | `diagnosticEventHubAuthorizationRuleId` | string | `''` | | Resource ID of the diagnostic event hub authorization rule for the Event Hubs namespace in which the event hub should be created or streamed to. | @@ -45,13 +53,14 @@ This module deploys a DocumentDB database account and its child resources. | `diagnosticStorageAccountId` | string | `''` | | Resource ID of the diagnostic storage account. | | `diagnosticWorkspaceId` | string | `''` | | Resource ID of the log analytics workspace. | | `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `gremlinDatabases` | _[gremlinDatabases](gremlinDatabases/readme.md)_ array | `[]` | | Gremlin Databases configurations. | | `location` | string | `[resourceGroup().location]` | | Location for all resources. | | `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | | `maxIntervalInSeconds` | int | `300` | | Max lag time (minutes). Required for BoundedStaleness. Valid ranges, Single Region: 5 to 84600. Multi Region: 300 to 86400. | | `maxStalenessPrefix` | int | `100000` | | Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000. | | `mongodbDatabases` | _[mongodbDatabases](mongodbDatabases/readme.md)_ array | `[]` | | MongoDB Databases configurations. | | `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalIds' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| `serverVersion` | string | `'4.0'` | `[3.2, 3.6, 4.0]` | Specifies the MongoDB server version to use. | +| `serverVersion` | string | `'4.2'` | `[3.2, 3.6, 4.0, 4.2]` | Specifies the MongoDB server version to use. | | `sqlDatabases` | _[sqlDatabases](sqlDatabases/readme.md)_ array | `[]` | | SQL Databases configurations. | | `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. | | `tags` | object | `{object}` | | Tags of the Database Account resource. | From f48ed7f880ef44f09e48de50ef2ee1865d292634 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Wed, 22 Jun 2022 12:51:50 +0200 Subject: [PATCH 4/7] Update arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep Co-authored-by: Alexander Sehr --- arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index ddbc05eec6..1192f5aeba 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -347,7 +347,7 @@ module mongodbDatabases_resource 'mongodbDatabases/deploy.bicep' = [for mongodbD }] module gremlinDatabases_resource 'gremlinDatabases/deploy.bicep' = [for gremlinDatabase in gremlinDatabases: { - name: '${uniqueString(deployment().name, location)}-mongodb-${gremlinDatabase.name}' + name: '${uniqueString(deployment().name, location)}-gremlin-${gremlinDatabase.name}' params: { databaseAccountName: databaseAccount.name name: gremlinDatabase.name From 7fae79ef2e0d778b09d3898d831212e300950932 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Thu, 23 Jun 2022 20:22:30 +0200 Subject: [PATCH 5/7] feat(gremlin-databases): Added tests and small bugfixes --- .../.test/deploy.full.test.bicep | 32 +++++++++++++ .../.test/deploy.minimal.test.bicep | 9 ++++ .../gremlinDatabases/deploy.bicep | 30 ++++++------ .../graphs/.test/deploy.full.test.bicep | 21 ++++++++ .../graphs/.test/deploy.minimal.test.bicep | 11 +++++ .../gremlinDatabases/graphs/deploy.bicep | 48 ++++--------------- .../gremlinDatabases/graphs/readme.md | 5 +- 7 files changed, 97 insertions(+), 59 deletions(-) create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep new file mode 100644 index 0000000000..c42bb78ba8 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep @@ -0,0 +1,32 @@ +var databaseAccountName = 'cosmosDb01' + +module fullGremlinDatabaseDeployment '../deploy.bicep' = { + name: 'fullGremlinDatabaseDeployment' + params: { + name: 'db01' + databaseAccountName: databaseAccountName + graphs: [ + { + name: 'graph01' + automaticIndexing: true + partitionKeyPaths: [ + '/address' + ] + } + { + name: 'graph02' + automaticIndexing: true + partitionKeyPaths: [ + '/name' + ] + } + ] + maxThroughput: 1000 + systemAssignedIdentity: true + tags: { + purpose: 'test' + } + throughput: 1000 + enableDefaultTelemetry: false + } +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep new file mode 100644 index 0000000000..8d951fa194 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep @@ -0,0 +1,9 @@ +var databaseAccountName = 'cosmosDb01' + +module minimalGremlinDatabaseDeployment '../deploy.bicep' = { + name: 'minimalGremlinDatabaseDeployment' + params: { + name: 'db01' + databaseAccountName: databaseAccountName + } +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep index 9406fe9da6..4d73454d76 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep @@ -13,7 +13,7 @@ param userAssignedIdentities object = {} @description('Conditional. The name of the parent Gremlin database. Required if the template is used in a standalone deployment.') param databaseAccountName string -@description('Optional. Array of graphs to deploy in the SQL database.') +@description('Optional. Array of graphs to deploy in the Gremlin database.') param graphs array = [] @description('Optional. Represents maximum throughput, the resource can scale up to.') @@ -50,18 +50,20 @@ resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-previ name: databaseAccountName } +var databaseOptions = contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? {} : { + autoscaleSettings: { + maxThroughput: maxThroughput == maxThroughput + } + throughput: throughput == throughput +} + resource gremlinDatabase 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases@2022-02-15-preview' = { name: name tags: tags parent: databaseAccount identity: identity properties: { - options: { - autoscaleSettings: { - maxThroughput: maxThroughput == 0 ? null : maxThroughput - } - throughput: throughput == 0 ? null : throughput - } + options: databaseOptions resource: { id: name } @@ -69,20 +71,16 @@ resource gremlinDatabase 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases } module gremlinGraphs 'graphs/deploy.bicep' = [for graph in graphs: { - name: '${uniqueString(deployment().name, gremlinDatabase.name)}-sqldb-${graph.name}' + name: '${uniqueString(deployment().name, gremlinDatabase.name)}-gremlindb-${graph.name}' params: { name: graph.name gremlinDatabaseName: name databaseAccountName: databaseAccountName - kind: !empty(graph.kind) ? graph.kind : null enableDefaultTelemetry: enableReferencedModulesTelemetry - automaticIndexing: !empty(graph.automaticIndexing) ? graph.automaticIndexing : null - indexingMode: !empty(graph.indexingMode) ? graph.indexingMode : null - indexingPaths: !empty(graph.indexingPaths) ? graph.indexingPaths : null - partitionKeyPaths: !empty(graph.partitionKeyPaths) ? graph.partitionKeyPaths : null - maxThroughput: !empty(graph.maxThroughput) ? graph.maxThroughput : null - throughput: !empty(graph.throughput) ? graph.throughput : null - uniqueKeyPaths: !empty(graph.uniqueKeyPaths) ? graph.uniqueKeyPaths : null + automaticIndexing: contains(graph, 'automaticIndexing') ? graph.automaticIndexing : true + partitionKeyPaths: !empty(graph.partitionKeyPaths) ? graph.partitionKeyPaths : [] + maxThroughput: contains(graph, 'maxThroughput') ? graph.maxThroughput : null + throughput: contains(graph, 'throughput') ? graph.throughput : null } }] diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep new file mode 100644 index 0000000000..270b12e7f9 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep @@ -0,0 +1,21 @@ +var databaseAccountName = 'cosmosDb01' +var gremlinDatabaseName = 'db01' + +module fullGremlinDatabaseDeployment '../deploy.bicep' = { + name: 'fullGremlinDatabaseDeployment' + params: { + name: 'graph03' + databaseAccountName: databaseAccountName + gremlinDatabaseName: gremlinDatabaseName + automaticIndexing: true + maxThroughput: 1000 + partitionKeyPaths: [ + '/name' + ] + tags: { + purpose: 'test' + } + throughput: 1000 + enableDefaultTelemetry: false + } +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep new file mode 100644 index 0000000000..e2c26e9846 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep @@ -0,0 +1,11 @@ +var databaseAccountName = 'cosmosDb01' +var gremlinDatabaseName = 'db01' + +module minimalGremlinDatabaseDeployment '../deploy.bicep' = { + name: 'minimalGremlinDatabaseDeployment' + params: { + name: 'graph03' + databaseAccountName: databaseAccountName + gremlinDatabaseName: gremlinDatabaseName + } +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep index f40f2ededb..9d47098691 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep @@ -11,7 +11,7 @@ param maxThroughput int = 0 param throughput int = 0 @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') -param enableDefaultTelemetry bool = false +param enableDefaultTelemetry bool = true @description('Conditional. The name of the parent Database Account. Required if the template is used in a standalone deployment.') param databaseAccountName string @@ -22,31 +22,9 @@ param gremlinDatabaseName string @description('Optional. Indicates if the indexing policy is automatic.') param automaticIndexing bool = true -@allowed([ - 'consistent' - 'lazy' - 'none' -]) -@description('Optional. Indicates the indexing mode.') -param indexingMode string = 'consistent' - -@allowed([ - 'Hash' - 'MultiHash' - 'Range' -]) -@description('Optional. Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (upto three maximum) are supported for container create.') -param kind string = 'Hash' - @description('Optional. List of paths using which data within the container can be partitioned.') param partitionKeyPaths array = [] -@description('Optional. List of paths must be unique for each document in the Azure Cosmos DB service.') -param uniqueKeyPaths array = [] - -@description('Optional. List of paths to include in the indexing.') -param indexingPaths array = [] - resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' properties: { @@ -67,35 +45,27 @@ resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-previ } } +var graphOptions = contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? {} : { + autoscaleSettings: { + maxThroughput: maxThroughput == maxThroughput + } + throughput: throughput == throughput +} + resource gremlinGraph 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs@2022-02-15-preview' = { name: name tags: tags parent: databaseAccount::gremlinDatabase properties: { - options: { - autoscaleSettings: { - maxThroughput: maxThroughput == 0 ? null : maxThroughput - } - throughput: throughput == 0 ? null : throughput - } + options: graphOptions resource: { id: name indexingPolicy: { automatic: automaticIndexing - indexingMode: indexingMode - includedPaths: !empty(indexingPaths) ? indexingPaths : null } partitionKey: { - kind: kind paths: !empty(partitionKeyPaths) ? partitionKeyPaths : null } - uniqueKeyPolicy: !empty(uniqueKeyPaths) ? { - uniqueKeys: [ - { - paths: uniqueKeyPaths - } - ] - } : null } } } diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md index a12f9a7467..06feb508c6 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md @@ -32,14 +32,11 @@ This module deploys DocumentDB DatabaseAccounts GremlinDatabases Graphs. | :-- | :-- | :-- | :-- | :-- | | `automaticIndexing` | bool | `True` | | Indicates if the indexing policy is automatic. | | `enableDefaultTelemetry` | bool | `False` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `indexingMode` | string | `'consistent'` | `[consistent, lazy, none]` | Indicates the indexing mode. | -| `indexingPaths` | array | `[]` | | List of paths to include in the indexing. Sets the `includedPaths` property. | | `kind` | string | `'Hash'` | `[Hash, MultiHash, Range]` | Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (up to three maximum) are supported for container create. | | `maxThroughput` | int | `0` | | Represents maximum throughput, the resource can scale up to. | | `partitionKeyPaths` | array | `[]` | | List of paths using which data within the container can be partitioned. | | `tags` | object | `{object}` | | Tags of the Gremlin graph resource. | | `throughput` | int | `0` | | Request Units per second. For example, "throughput": 10000. | -| `uniqueKeyPaths` | array | `[]` | | List of paths must be unique for each document in the Azure Cosmos DB service. | ### Parameter Usage: `tags` @@ -83,7 +80,7 @@ tags: {

-### Parameter Usage: `indexingPaths`, `partitionKeyPaths`, `uniqueKeyPaths` +### Parameter Usage: `partitionKeyPaths`, `uniqueKeyPaths` Different kinds of paths can be provided as array of strings: From e91ede022e6fb88ad62674b8aeb82bc90e673e9f Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Sun, 3 Jul 2022 19:55:36 +0200 Subject: [PATCH 6/7] feat(gremlin): Updated tests, pipeline, parameters --- .../ms.documentdb.databaseaccounts.yml | 1 + .../.parameters/gremlindb.parameters.json | 96 +++++++++++++++++++ .../databaseAccounts/deploy.bicep | 46 ++++----- .../.test/deploy.full.test.bicep | 32 ------- .../.test/deploy.minimal.test.bicep | 9 -- .../gremlinDatabases/deploy.bicep | 8 +- .../graphs/.test/deploy.full.test.bicep | 21 ---- .../graphs/.test/deploy.minimal.test.bicep | 11 --- .../gremlinDatabases/graphs/deploy.bicep | 14 --- .../gremlinDatabases/graphs/readme.md | 4 +- 10 files changed, 123 insertions(+), 119 deletions(-) create mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/.parameters/gremlindb.parameters.json delete mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep delete mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep delete mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep delete mode 100644 arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep diff --git a/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml b/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml index 4966965b0b..d7a849bdc1 100644 --- a/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml +++ b/.azuredevops/modulePipelines/ms.documentdb.databaseaccounts.yml @@ -46,6 +46,7 @@ stages: removeDeployment: '${{ parameters.removeDeployment }}' deploymentBlocks: - path: $(modulePath)/.parameters/mongodb.parameters.json + - path: $(modulePath)/.parameters/gremlindb.parameters.json - path: $(modulePath)/.parameters/plain.parameters.json - path: $(modulePath)/.parameters/sqldb.parameters.json diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/gremlindb.parameters.json b/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/gremlindb.parameters.json new file mode 100644 index 0000000000..e252a40107 --- /dev/null +++ b/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/gremlindb.parameters.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-cdb-gremlindb-001" + }, + "location": { + "value": "West Europe" + }, + "locations": { + "value": [ + { + "locationName": "West Europe", + "failoverPriority": 0, + "isZoneRedundant": false + }, + { + "locationName": "North Europe", + "failoverPriority": 1, + "isZoneRedundant": false + } + ] + }, + "roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "principalIds": [ + "<>" + ] + } + ] + }, + "gremlinDatabases": { + "value": [ + { + "name": "<>-az-gdb-x-001", + "graphs": [ + { + "name": "car_collection", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/car_id" + ] + }, + { + "name": "truck_collection", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/truck_id" + ] + } + ] + }, + { + "name": "<>-az-gdb-x-002", + "collections": [ + { + "name": "bike_collection", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/bike_id" + ] + }, + { + "name": "bicycle_collection", + "automaticIndexing": true, + "partitionKeyPaths": [ + "/bicycle_id" + ] + } + ] + } + ] + }, + "diagnosticLogsRetentionInDays": { + "value": 7 + }, + "diagnosticStorageAccountId": { + "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" + }, + "diagnosticWorkspaceId": { + "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" + }, + "diagnosticEventHubAuthorizationRuleId": { + "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" + }, + "diagnosticEventHubName": { + "value": "adp-<>-az-evh-x-001" + }, + "systemAssignedIdentity": { + "value": true + } + } +} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index 1192f5aeba..23b36ad8f3 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -246,31 +246,27 @@ var backupPolicy = backupPolicyType == 'Continuous' ? { } } -var databaseAccount_properties = !empty(sqlDatabases) ? { - consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] - locations: databaseAccount_locations - databaseAccountOfferType: databaseAccountOfferType - enableAutomaticFailover: automaticFailover - capabilities: capabilities - backupPolicy: backupPolicy -} : !empty(mongodbDatabases) ? { - consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] - locations: databaseAccount_locations - databaseAccountOfferType: databaseAccountOfferType - apiProperties: { - serverVersion: serverVersion - } - capabilities: capabilities - backupPolicy: backupPolicy -} : !empty(gremlinDatabases) ? { - consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] - locations: databaseAccount_locations - databaseAccountOfferType: databaseAccountOfferType - capabilities: capabilities - backupPolicy: backupPolicy -} : { - databaseAccountOfferType: databaseAccountOfferType -} +var databaseAccount_properties = union({ + databaseAccountOfferType: databaseAccountOfferType + }, + // Common properties + ((!empty(sqlDatabases) || !empty(mongodbDatabases) || !empty(gremlinDatabases)) ? { + consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] + locations: databaseAccount_locations + capabilities: capabilities + backupPolicy: backupPolicy + } : {}), + // SQLDB properties + (!empty(sqlDatabases) ? { + enableAutomaticFailover: automaticFailover + } : {}), + // MongoDb properties + (!empty(mongodbDatabases) ? { + apiProperties: { + serverVersion: serverVersion + } + } : {}) +) resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep deleted file mode 100644 index c42bb78ba8..0000000000 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.full.test.bicep +++ /dev/null @@ -1,32 +0,0 @@ -var databaseAccountName = 'cosmosDb01' - -module fullGremlinDatabaseDeployment '../deploy.bicep' = { - name: 'fullGremlinDatabaseDeployment' - params: { - name: 'db01' - databaseAccountName: databaseAccountName - graphs: [ - { - name: 'graph01' - automaticIndexing: true - partitionKeyPaths: [ - '/address' - ] - } - { - name: 'graph02' - automaticIndexing: true - partitionKeyPaths: [ - '/name' - ] - } - ] - maxThroughput: 1000 - systemAssignedIdentity: true - tags: { - purpose: 'test' - } - throughput: 1000 - enableDefaultTelemetry: false - } -} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep deleted file mode 100644 index 8d951fa194..0000000000 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/.test/deploy.minimal.test.bicep +++ /dev/null @@ -1,9 +0,0 @@ -var databaseAccountName = 'cosmosDb01' - -module minimalGremlinDatabaseDeployment '../deploy.bicep' = { - name: 'minimalGremlinDatabaseDeployment' - params: { - name: 'db01' - databaseAccountName: databaseAccountName - } -} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep index 4d73454d76..ebaef62e11 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep @@ -16,9 +16,11 @@ param databaseAccountName string @description('Optional. Array of graphs to deploy in the Gremlin database.') param graphs array = [] +@minValue(400) @description('Optional. Represents maximum throughput, the resource can scale up to.') param maxThroughput int = 0 +@minValue(400) @description('Optional. Request Units per second. For example, "throughput": 10000.') param throughput int = 0 @@ -52,9 +54,9 @@ resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-previ var databaseOptions = contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? {} : { autoscaleSettings: { - maxThroughput: maxThroughput == maxThroughput + maxThroughput: maxThroughput } - throughput: throughput == throughput + throughput: throughput } resource gremlinDatabase 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases@2022-02-15-preview' = { @@ -79,8 +81,6 @@ module gremlinGraphs 'graphs/deploy.bicep' = [for graph in graphs: { enableDefaultTelemetry: enableReferencedModulesTelemetry automaticIndexing: contains(graph, 'automaticIndexing') ? graph.automaticIndexing : true partitionKeyPaths: !empty(graph.partitionKeyPaths) ? graph.partitionKeyPaths : [] - maxThroughput: contains(graph, 'maxThroughput') ? graph.maxThroughput : null - throughput: contains(graph, 'throughput') ? graph.throughput : null } }] diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep deleted file mode 100644 index 270b12e7f9..0000000000 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.full.test.bicep +++ /dev/null @@ -1,21 +0,0 @@ -var databaseAccountName = 'cosmosDb01' -var gremlinDatabaseName = 'db01' - -module fullGremlinDatabaseDeployment '../deploy.bicep' = { - name: 'fullGremlinDatabaseDeployment' - params: { - name: 'graph03' - databaseAccountName: databaseAccountName - gremlinDatabaseName: gremlinDatabaseName - automaticIndexing: true - maxThroughput: 1000 - partitionKeyPaths: [ - '/name' - ] - tags: { - purpose: 'test' - } - throughput: 1000 - enableDefaultTelemetry: false - } -} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep deleted file mode 100644 index e2c26e9846..0000000000 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/.test/deploy.minimal.test.bicep +++ /dev/null @@ -1,11 +0,0 @@ -var databaseAccountName = 'cosmosDb01' -var gremlinDatabaseName = 'db01' - -module minimalGremlinDatabaseDeployment '../deploy.bicep' = { - name: 'minimalGremlinDatabaseDeployment' - params: { - name: 'graph03' - databaseAccountName: databaseAccountName - gremlinDatabaseName: gremlinDatabaseName - } -} diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep index 9d47098691..59742e7da2 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/deploy.bicep @@ -4,12 +4,6 @@ param name string @description('Optional. Tags of the Gremlin graph resource.') param tags object = {} -@description('Optional. Represents maximum throughput, the resource can scale up to.') -param maxThroughput int = 0 - -@description('Optional. Request Units per second. For example, "throughput": 10000.') -param throughput int = 0 - @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') param enableDefaultTelemetry bool = true @@ -45,19 +39,11 @@ resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-previ } } -var graphOptions = contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? {} : { - autoscaleSettings: { - maxThroughput: maxThroughput == maxThroughput - } - throughput: throughput == throughput -} - resource gremlinGraph 'Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs@2022-02-15-preview' = { name: name tags: tags parent: databaseAccount::gremlinDatabase properties: { - options: graphOptions resource: { id: name indexingPolicy: { diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md index 06feb508c6..a03f7cb937 100644 --- a/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md +++ b/arm/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/graphs/readme.md @@ -33,10 +33,8 @@ This module deploys DocumentDB DatabaseAccounts GremlinDatabases Graphs. | `automaticIndexing` | bool | `True` | | Indicates if the indexing policy is automatic. | | `enableDefaultTelemetry` | bool | `False` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | | `kind` | string | `'Hash'` | `[Hash, MultiHash, Range]` | Indicates the kind of algorithm used for partitioning. For MultiHash, multiple partition keys (up to three maximum) are supported for container create. | -| `maxThroughput` | int | `0` | | Represents maximum throughput, the resource can scale up to. | | `partitionKeyPaths` | array | `[]` | | List of paths using which data within the container can be partitioned. | | `tags` | object | `{object}` | | Tags of the Gremlin graph resource. | -| `throughput` | int | `0` | | Request Units per second. For example, "throughput": 10000. | ### Parameter Usage: `tags` @@ -96,7 +94,7 @@ graphs: [ partitionKeyPaths: [ '/name' ], - + } { name: 'graph02' From 3db62367a2f0c1aaa2b8dfd1ed29fb24634c31c3 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Sun, 3 Jul 2022 20:02:08 +0200 Subject: [PATCH 7/7] refactor(test): Changed .parameters to .test --- .../{.parameters => .test}/gremlindb.parameters.json | 0 .../{.parameters => .test}/mongodb.parameters.json | 0 .../databaseAccounts/{.parameters => .test}/plain.parameters.json | 0 .../databaseAccounts/{.parameters => .test}/sqldb.parameters.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename arm/Microsoft.DocumentDB/databaseAccounts/{.parameters => .test}/gremlindb.parameters.json (100%) rename arm/Microsoft.DocumentDB/databaseAccounts/{.parameters => .test}/mongodb.parameters.json (100%) rename arm/Microsoft.DocumentDB/databaseAccounts/{.parameters => .test}/plain.parameters.json (100%) rename arm/Microsoft.DocumentDB/databaseAccounts/{.parameters => .test}/sqldb.parameters.json (100%) diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/gremlindb.parameters.json b/arm/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json similarity index 100% rename from arm/Microsoft.DocumentDB/databaseAccounts/.parameters/gremlindb.parameters.json rename to arm/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/mongodb.parameters.json b/arm/Microsoft.DocumentDB/databaseAccounts/.test/mongodb.parameters.json similarity index 100% rename from arm/Microsoft.DocumentDB/databaseAccounts/.parameters/mongodb.parameters.json rename to arm/Microsoft.DocumentDB/databaseAccounts/.test/mongodb.parameters.json diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/plain.parameters.json b/arm/Microsoft.DocumentDB/databaseAccounts/.test/plain.parameters.json similarity index 100% rename from arm/Microsoft.DocumentDB/databaseAccounts/.parameters/plain.parameters.json rename to arm/Microsoft.DocumentDB/databaseAccounts/.test/plain.parameters.json diff --git a/arm/Microsoft.DocumentDB/databaseAccounts/.parameters/sqldb.parameters.json b/arm/Microsoft.DocumentDB/databaseAccounts/.test/sqldb.parameters.json similarity index 100% rename from arm/Microsoft.DocumentDB/databaseAccounts/.parameters/sqldb.parameters.json rename to arm/Microsoft.DocumentDB/databaseAccounts/.test/sqldb.parameters.json