From 0eafaf585a776910c1d63cb2578bc673bdb3277c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Mon, 13 May 2024 14:18:39 +0200 Subject: [PATCH 1/7] Updated version for Hash default to 2 --- .../database-account/sql-database/container/main.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avm/res/document-db/database-account/sql-database/container/main.bicep b/avm/res/document-db/database-account/sql-database/container/main.bicep index 97f4a59e5b..caedd69eab 100644 --- a/avm/res/document-db/database-account/sql-database/container/main.bicep +++ b/avm/res/document-db/database-account/sql-database/container/main.bicep @@ -62,7 +62,7 @@ var containerResourceParams = union( partitionKey: { paths: partitionKeyPaths kind: kind - version: kind == 'MultiHash' ? 2 : 1 + version: kind == 'Range' ? 1 : 2 } uniqueKeyPolicy: !empty(uniqueKeyPolicyKeys) ? { From 75cd5f9e0ce0f3a4b68d59ef9da28dc4dcca27f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Mon, 13 May 2024 14:28:08 +0200 Subject: [PATCH 2/7] Updated the module --- .../gremlin-database/graph/main.json | 4 +-- .../gremlin-database/main.json | 8 ++--- .../document-db/database-account/main.json | 34 +++++++++---------- .../mongodb-database/collection/main.json | 4 +-- .../mongodb-database/main.json | 8 ++--- .../sql-database/container/main.json | 6 ++-- .../database-account/sql-database/main.json | 10 +++--- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/avm/res/document-db/database-account/gremlin-database/graph/main.json b/avm/res/document-db/database-account/gremlin-database/graph/main.json index 1779026f4f..2d4f0f12fa 100644 --- a/avm/res/document-db/database-account/gremlin-database/graph/main.json +++ b/avm/res/document-db/database-account/gremlin-database/graph/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "2823004405398378621" + "version": "0.27.1.19265", + "templateHash": "3987394297554402770" }, "name": "DocumentDB Database Accounts Gremlin Databases Graphs", "description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.", diff --git a/avm/res/document-db/database-account/gremlin-database/main.json b/avm/res/document-db/database-account/gremlin-database/main.json index c3cd9ee8c7..57548e1867 100644 --- a/avm/res/document-db/database-account/gremlin-database/main.json +++ b/avm/res/document-db/database-account/gremlin-database/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "13414524346849431368" + "version": "0.27.1.19265", + "templateHash": "6889435067791947905" }, "name": "DocumentDB Database Account Gremlin Databases", "description": "This module deploys a Gremlin Database within a CosmosDB Account.", @@ -109,8 +109,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "2823004405398378621" + "version": "0.27.1.19265", + "templateHash": "3987394297554402770" }, "name": "DocumentDB Database Accounts Gremlin Databases Graphs", "description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.", diff --git a/avm/res/document-db/database-account/main.json b/avm/res/document-db/database-account/main.json index 943fa8af42..90b5ee9694 100644 --- a/avm/res/document-db/database-account/main.json +++ b/avm/res/document-db/database-account/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "9794166259717067711" + "version": "0.27.1.19265", + "templateHash": "1471200495200524656" }, "name": "DocumentDB Database Accounts", "description": "This module deploys a DocumentDB Database Account.", @@ -1249,8 +1249,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "3826907101153138616" + "version": "0.27.1.19265", + "templateHash": "14993962216021395679" }, "name": "DocumentDB Database Account SQL Databases", "description": "This module deploys a SQL Database in a CosmosDB Account.", @@ -1379,8 +1379,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "11250469246171251281" + "version": "0.27.1.19265", + "templateHash": "6183061195345158504" }, "name": "DocumentDB Database Account SQL Database Containers", "description": "This module deploys a SQL Database Container in a CosmosDB Account.", @@ -1496,7 +1496,7 @@ "input": "[if(startsWith(parameters('paths')[copyIndex('partitionKeyPaths')], '/'), parameters('paths')[copyIndex('partitionKeyPaths')], format('/{0}', parameters('paths')[copyIndex('partitionKeyPaths')]))]" } ], - "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'MultiHash'), 2, 1)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" + "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'Range'), 1, 2)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" }, "resources": { "databaseAccount::sqlDatabase": { @@ -1622,8 +1622,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "7706794569430424680" + "version": "0.27.1.19265", + "templateHash": "1527748615955553712" }, "name": "DocumentDB Database Account MongoDB Databases", "description": "This module deploys a MongoDB Database within a CosmosDB Account.", @@ -1725,8 +1725,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "1989910090472113779" + "version": "0.27.1.19265", + "templateHash": "6235322895830297683" }, "name": "DocumentDB Database Account MongoDB Database Collections", "description": "This module deploys a MongoDB Database Collection.", @@ -1881,8 +1881,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "13414524346849431368" + "version": "0.27.1.19265", + "templateHash": "6889435067791947905" }, "name": "DocumentDB Database Account Gremlin Databases", "description": "This module deploys a Gremlin Database within a CosmosDB Account.", @@ -1985,8 +1985,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "2823004405398378621" + "version": "0.27.1.19265", + "templateHash": "3987394297554402770" }, "name": "DocumentDB Database Accounts Gremlin Databases Graphs", "description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.", @@ -2848,8 +2848,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "3376784638805058420" + "version": "0.27.1.19265", + "templateHash": "17423703517558214368" } }, "definitions": { diff --git a/avm/res/document-db/database-account/mongodb-database/collection/main.json b/avm/res/document-db/database-account/mongodb-database/collection/main.json index ae74132b53..eeb2943ec8 100644 --- a/avm/res/document-db/database-account/mongodb-database/collection/main.json +++ b/avm/res/document-db/database-account/mongodb-database/collection/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "1989910090472113779" + "version": "0.27.1.19265", + "templateHash": "6235322895830297683" }, "name": "DocumentDB Database Account MongoDB Database Collections", "description": "This module deploys a MongoDB Database Collection.", diff --git a/avm/res/document-db/database-account/mongodb-database/main.json b/avm/res/document-db/database-account/mongodb-database/main.json index 781bd56a97..a862d99d20 100644 --- a/avm/res/document-db/database-account/mongodb-database/main.json +++ b/avm/res/document-db/database-account/mongodb-database/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "7706794569430424680" + "version": "0.27.1.19265", + "templateHash": "1527748615955553712" }, "name": "DocumentDB Database Account MongoDB Databases", "description": "This module deploys a MongoDB Database within a CosmosDB Account.", @@ -108,8 +108,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "1989910090472113779" + "version": "0.27.1.19265", + "templateHash": "6235322895830297683" }, "name": "DocumentDB Database Account MongoDB Database Collections", "description": "This module deploys a MongoDB Database Collection.", diff --git a/avm/res/document-db/database-account/sql-database/container/main.json b/avm/res/document-db/database-account/sql-database/container/main.json index 815512145c..bab8d0f49b 100644 --- a/avm/res/document-db/database-account/sql-database/container/main.json +++ b/avm/res/document-db/database-account/sql-database/container/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "11250469246171251281" + "version": "0.27.1.19265", + "templateHash": "6183061195345158504" }, "name": "DocumentDB Database Account SQL Database Containers", "description": "This module deploys a SQL Database Container in a CosmosDB Account.", @@ -122,7 +122,7 @@ "input": "[if(startsWith(parameters('paths')[copyIndex('partitionKeyPaths')], '/'), parameters('paths')[copyIndex('partitionKeyPaths')], format('/{0}', parameters('paths')[copyIndex('partitionKeyPaths')]))]" } ], - "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'MultiHash'), 2, 1)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" + "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'Range'), 1, 2)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" }, "resources": { "databaseAccount::sqlDatabase": { diff --git a/avm/res/document-db/database-account/sql-database/main.json b/avm/res/document-db/database-account/sql-database/main.json index 0419417fa5..0d51fe224d 100644 --- a/avm/res/document-db/database-account/sql-database/main.json +++ b/avm/res/document-db/database-account/sql-database/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "3826907101153138616" + "version": "0.27.1.19265", + "templateHash": "14993962216021395679" }, "name": "DocumentDB Database Account SQL Databases", "description": "This module deploys a SQL Database in a CosmosDB Account.", @@ -135,8 +135,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.54.24096", - "templateHash": "11250469246171251281" + "version": "0.27.1.19265", + "templateHash": "6183061195345158504" }, "name": "DocumentDB Database Account SQL Database Containers", "description": "This module deploys a SQL Database Container in a CosmosDB Account.", @@ -252,7 +252,7 @@ "input": "[if(startsWith(parameters('paths')[copyIndex('partitionKeyPaths')], '/'), parameters('paths')[copyIndex('partitionKeyPaths')], format('/{0}', parameters('paths')[copyIndex('partitionKeyPaths')]))]" } ], - "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'MultiHash'), 2, 1)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" + "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'Range'), 1, 2)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" }, "resources": { "databaseAccount::sqlDatabase": { From 0440973923e69f93cbf4ef4f13267f198636ade0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Tue, 14 May 2024 17:52:20 +0200 Subject: [PATCH 3/7] Renamed illegal parameter --- .../document-db/database-account/main.bicep | 131 +++++++++--------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/avm/res/document-db/database-account/main.bicep b/avm/res/document-db/database-account/main.bicep index 5cbfbfe85d..5e9eacf4e2 100644 --- a/avm/res/document-db/database-account/main.bicep +++ b/avm/res/document-db/database-account/main.bicep @@ -233,7 +233,7 @@ var virtualNetworkRules = [ } ] -var databaseAccount_properties = union( +var databaseAccountProperties = union( { databaseAccountOfferType: databaseAccountOfferType }, @@ -308,24 +308,23 @@ var builtInRoleNames = { ) } -resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' = - if (enableTelemetry) { - name: '46d3xbcp.res.documentdb-databaseaccount.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' - properties: { - mode: 'Incremental' - template: { - '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' - contentVersion: '1.0.0.0' - resources: [] - outputs: { - telemetry: { - type: 'String' - value: 'For more information, see https://aka.ms/avm/TelemetryInfo' - } +resource avmTelemetry 'Microsoft.Resources/deployments@2023-07-01' = if (enableTelemetry) { + name: '46d3xbcp.res.documentdb-databaseaccount.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + outputs: { + telemetry: { + type: 'String' + value: 'For more information, see https://aka.ms/avm/TelemetryInfo' } } } } +} resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = { name: name @@ -333,20 +332,19 @@ resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = { tags: tags identity: identity kind: kind - properties: databaseAccount_properties + properties: databaseAccountProperties } -resource databaseAccount_lock 'Microsoft.Authorization/locks@2020-05-01' = - if (!empty(lock ?? {}) && lock.?kind != 'None') { - name: lock.?name ?? 'lock-${name}' - properties: { - level: lock.?kind ?? '' - notes: lock.?kind == 'CanNotDelete' - ? 'Cannot delete resource or child resources.' - : 'Cannot delete or modify the resource or child resources.' - } - scope: databaseAccount +resource databaseAccount_lock 'Microsoft.Authorization/locks@2020-05-01' = if (!empty(lock ?? {}) && lock.?kind != 'None') { + name: lock.?name ?? 'lock-${name}' + properties: { + level: lock.?kind ?? '' + notes: lock.?kind == 'CanNotDelete' + ? 'Cannot delete resource or child resources.' + : 'Cannot delete or modify the resource or child resources.' } + scope: databaseAccount +} resource databaseAccount_diagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [ for (diagnosticSetting, index) in (diagnosticSettings ?? []): { @@ -490,49 +488,48 @@ module databaseAccount_privateEndpoints 'br/public:avm/res/network/private-endpo } ] -module keyVault 'modules/secrets-key-vault.bicep' = - if (secretsKeyVault != null) { - name: '${uniqueString(deployment().name, location)}-secrets-kv' - scope: resourceGroup(secretsKeyVault.?resourceGroupName ?? resourceGroup().name) - params: { - keyVaultName: secretsKeyVault!.keyVaultName +module keyVault 'modules/secrets-key-vault.bicep' = if (secretsKeyVault != null) { + name: '${uniqueString(deployment().name, location)}-secrets-kv' + scope: resourceGroup(secretsKeyVault.?resourceGroupName ?? resourceGroup().name) + params: { + keyVaultName: secretsKeyVault!.keyVaultName - keySecrets: [ - { - secretName: secretsKeyVault.?primaryWriteKeySecretName ?? 'Primary-Write-Key' - secretValue: databaseAccount.listKeys().primaryMasterKey - } - { - secretName: secretsKeyVault.?primaryReadOnlyKeySecretName ?? 'Primary-Readonly-Key' - secretValue: databaseAccount.listKeys().primaryReadonlyMasterKey - } - { - secretName: secretsKeyVault.?primaryWriteConnectionStringSecretName ?? 'Primary-Write-ConnectionString' - secretValue: databaseAccount.listConnectionStrings().connectionStrings[0].connectionString - } - { - secretName: secretsKeyVault.?primaryReadonlyConnectionStringSecretName ?? 'Primary-Readonly-ConnectionString' - secretValue: databaseAccount.listConnectionStrings().connectionStrings[2].connectionString - } - { - secretName: secretsKeyVault.?secondaryWriteKeySecretName ?? 'Secondary-Write-Key' - secretValue: databaseAccount.listKeys().secondaryMasterKey - } - { - secretName: secretsKeyVault.?secondaryReadonlyKeySecretName ?? 'Secondary-Readonly-Key' - secretValue: databaseAccount.listKeys().secondaryReadonlyMasterKey - } - { - secretName: secretsKeyVault.?secondaryWriteConnectionStringSecretName ?? 'Secondary-Write-ConnectionString' - secretValue: databaseAccount.listConnectionStrings().connectionStrings[1].connectionString - } - { - secretName: secretsKeyVault.?secondaryReadonlyConnectionStringSecretName ?? 'Secondary-Readonly-ConnectionString' - secretValue: databaseAccount.listConnectionStrings().connectionStrings[3].connectionString - } - ] - } + keySecrets: [ + { + secretName: secretsKeyVault.?primaryWriteKeySecretName ?? 'Primary-Write-Key' + secretValue: databaseAccount.listKeys().primaryMasterKey + } + { + secretName: secretsKeyVault.?primaryReadOnlyKeySecretName ?? 'Primary-Readonly-Key' + secretValue: databaseAccount.listKeys().primaryReadonlyMasterKey + } + { + secretName: secretsKeyVault.?primaryWriteConnectionStringSecretName ?? 'Primary-Write-ConnectionString' + secretValue: databaseAccount.listConnectionStrings().connectionStrings[0].connectionString + } + { + secretName: secretsKeyVault.?primaryReadonlyConnectionStringSecretName ?? 'Primary-Readonly-ConnectionString' + secretValue: databaseAccount.listConnectionStrings().connectionStrings[2].connectionString + } + { + secretName: secretsKeyVault.?secondaryWriteKeySecretName ?? 'Secondary-Write-Key' + secretValue: databaseAccount.listKeys().secondaryMasterKey + } + { + secretName: secretsKeyVault.?secondaryReadonlyKeySecretName ?? 'Secondary-Readonly-Key' + secretValue: databaseAccount.listKeys().secondaryReadonlyMasterKey + } + { + secretName: secretsKeyVault.?secondaryWriteConnectionStringSecretName ?? 'Secondary-Write-ConnectionString' + secretValue: databaseAccount.listConnectionStrings().connectionStrings[1].connectionString + } + { + secretName: secretsKeyVault.?secondaryReadonlyConnectionStringSecretName ?? 'Secondary-Readonly-ConnectionString' + secretValue: databaseAccount.listConnectionStrings().connectionStrings[3].connectionString + } + ] } +} @description('The name of the database account.') output name string = databaseAccount.name From 6015f8d44ef011887536085c8edce268d64618ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Tue, 14 May 2024 17:58:42 +0200 Subject: [PATCH 4/7] bicep build run manually --- avm/res/document-db/database-account/main.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/avm/res/document-db/database-account/main.json b/avm/res/document-db/database-account/main.json index 90b5ee9694..faf02304d5 100644 --- a/avm/res/document-db/database-account/main.json +++ b/avm/res/document-db/database-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "1471200495200524656" + "templateHash": "15590218096236066082" }, "name": "DocumentDB Database Accounts", "description": "This module deploys a DocumentDB Database Account.", @@ -1090,7 +1090,7 @@ ], "kind": "[if(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('gremlinDatabases')))), 'GlobalDocumentDB', if(not(empty(parameters('mongodbDatabases'))), 'MongoDB', 'GlobalDocumentDB'))]", "backupPolicy": "[if(equals(parameters('backupPolicyType'), 'Continuous'), createObject('type', parameters('backupPolicyType'), 'continuousModeProperties', createObject('tier', parameters('backupPolicyContinuousTier'))), createObject('type', parameters('backupPolicyType'), 'periodicModeProperties', createObject('backupIntervalInMinutes', parameters('backupIntervalInMinutes'), 'backupRetentionIntervalInHours', parameters('backupRetentionIntervalInHours'), 'backupStorageRedundancy', parameters('backupStorageRedundancy'))))]", - "databaseAccount_properties": "[union(createObject('databaseAccountOfferType', parameters('databaseAccountOfferType')), if(or(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('mongodbDatabases')))), not(empty(parameters('gremlinDatabases')))), createObject('consistencyPolicy', variables('consistencyPolicy')[parameters('defaultConsistencyLevel')], 'enableMultipleWriteLocations', parameters('enableMultipleWriteLocations'), 'locations', if(empty(variables('databaseAccount_locations')), variables('defaultFailoverLocation'), variables('databaseAccount_locations')), 'ipRules', variables('ipRules'), 'virtualNetworkRules', variables('virtualNetworkRules'), 'networkAclBypass', coalesce(tryGet(parameters('networkRestrictions'), 'networkAclBypass'), 'AzureServices'), 'publicNetworkAccess', coalesce(tryGet(parameters('networkRestrictions'), 'publicNetworkAccess'), 'Enabled'), 'isVirtualNetworkFilterEnabled', or(not(empty(variables('ipRules'))), not(empty(variables('virtualNetworkRules')))), 'capabilities', variables('capabilities'), 'enableFreeTier', parameters('enableFreeTier'), 'backupPolicy', variables('backupPolicy'), 'enableAutomaticFailover', parameters('automaticFailover'), 'enableAnalyticalStorage', parameters('enableAnalyticalStorage')), createObject()), if(not(empty(parameters('sqlDatabases'))), createObject('disableLocalAuth', parameters('disableLocalAuth'), 'disableKeyBasedMetadataWriteAccess', parameters('disableKeyBasedMetadataWriteAccess')), createObject()), if(not(empty(parameters('mongodbDatabases'))), createObject('apiProperties', createObject('serverVersion', parameters('serverVersion'))), createObject()))]", + "databaseAccountProperties": "[union(createObject('databaseAccountOfferType', parameters('databaseAccountOfferType')), if(or(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('mongodbDatabases')))), not(empty(parameters('gremlinDatabases')))), createObject('consistencyPolicy', variables('consistencyPolicy')[parameters('defaultConsistencyLevel')], 'enableMultipleWriteLocations', parameters('enableMultipleWriteLocations'), 'locations', if(empty(variables('databaseAccount_locations')), variables('defaultFailoverLocation'), variables('databaseAccount_locations')), 'ipRules', variables('ipRules'), 'virtualNetworkRules', variables('virtualNetworkRules'), 'networkAclBypass', coalesce(tryGet(parameters('networkRestrictions'), 'networkAclBypass'), 'AzureServices'), 'publicNetworkAccess', coalesce(tryGet(parameters('networkRestrictions'), 'publicNetworkAccess'), 'Enabled'), 'isVirtualNetworkFilterEnabled', or(not(empty(variables('ipRules'))), not(empty(variables('virtualNetworkRules')))), 'capabilities', variables('capabilities'), 'enableFreeTier', parameters('enableFreeTier'), 'backupPolicy', variables('backupPolicy'), 'enableAutomaticFailover', parameters('automaticFailover'), 'enableAnalyticalStorage', parameters('enableAnalyticalStorage')), createObject()), if(not(empty(parameters('sqlDatabases'))), createObject('disableLocalAuth', parameters('disableLocalAuth'), 'disableKeyBasedMetadataWriteAccess', parameters('disableKeyBasedMetadataWriteAccess')), createObject()), if(not(empty(parameters('mongodbDatabases'))), createObject('apiProperties', createObject('serverVersion', parameters('serverVersion'))), createObject()))]", "builtInRoleNames": { "Contributor": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", "Cosmos DB Account Reader Role": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fbdf93bf-df7d-467e-a4d2-9458aa1360c8')]", @@ -1133,7 +1133,7 @@ "tags": "[parameters('tags')]", "identity": "[variables('identity')]", "kind": "[variables('kind')]", - "properties": "[variables('databaseAccount_properties')]" + "properties": "[variables('databaseAccountProperties')]" }, "databaseAccount_lock": { "condition": "[and(not(empty(coalesce(parameters('lock'), createObject()))), not(equals(tryGet(parameters('lock'), 'kind'), 'None')))]", From 3565e55091318120a53d2d85092aedf733282d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Tue, 21 May 2024 13:59:36 +0200 Subject: [PATCH 5/7] Added version to sql containers --- avm/res/document-db/database-account/main.bicep | 3 +++ .../database-account/sql-database/container/main.bicep | 6 ++++-- .../document-db/database-account/sql-database/main.bicep | 1 + .../database-account/tests/e2e/sqldb/main.test.bicep | 8 ++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/avm/res/document-db/database-account/main.bicep b/avm/res/document-db/database-account/main.bicep index 65501fdbbf..867387fc19 100644 --- a/avm/res/document-db/database-account/main.bicep +++ b/avm/res/document-db/database-account/main.bicep @@ -772,6 +772,9 @@ type sqlDatabaseType = { @description('Optional. Default to Hash. Indicates the kind of algorithm used for partitioning.') kind: ('Hash' | 'MultiHash')? + @description('Optional. Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition.') + version: (1 | 2)? + @description('Optional. Default to 400. Request Units per second. Will be ignored if autoscaleSettingsMaxThroughput is used.') throughput: int? diff --git a/avm/res/document-db/database-account/sql-database/container/main.bicep b/avm/res/document-db/database-account/sql-database/container/main.bicep index caedd69eab..902ee2ec8f 100644 --- a/avm/res/document-db/database-account/sql-database/container/main.bicep +++ b/avm/res/document-db/database-account/sql-database/container/main.bicep @@ -47,9 +47,11 @@ param uniqueKeyPolicyKeys array = [] @allowed([ 'Hash' 'MultiHash' - 'Range' ]) param kind string = 'Hash' +@description('Optional. Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition.') +@allowed([1, 2]) +param version int = 1 var partitionKeyPaths = [for path in paths: startsWith(path, '/') ? path : '/${path}'] @@ -62,7 +64,7 @@ var containerResourceParams = union( partitionKey: { paths: partitionKeyPaths kind: kind - version: kind == 'Range' ? 1 : 2 + version: kind == 'MultiHash' ? 2 : version } uniqueKeyPolicy: !empty(uniqueKeyPolicyKeys) ? { diff --git a/avm/res/document-db/database-account/sql-database/main.bicep b/avm/res/document-db/database-account/sql-database/main.bicep index a62ea3f09f..d79d8f1802 100644 --- a/avm/res/document-db/database-account/sql-database/main.bicep +++ b/avm/res/document-db/database-account/sql-database/main.bicep @@ -58,6 +58,7 @@ module container 'container/main.bicep' = [ defaultTtl: container.?defaultTtl indexingPolicy: container.?indexingPolicy kind: container.?kind + version: container.?version paths: container.?paths throughput: (throughput != null || autoscaleSettingsMaxThroughput != null) && container.?throughput == null ? -1 diff --git a/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep b/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep index 6662bd82a2..4d9362e8aa 100644 --- a/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep +++ b/avm/res/document-db/database-account/tests/e2e/sqldb/main.test.bicep @@ -278,6 +278,14 @@ module testDeployment '../../../main.bicep' = { 'myPartitionKey1' ] } + { + name: 'container-005' + kind: 'Hash' + version: 2 + paths: [ + 'myPartitionKey1' + ] + } ] name: 'all-partition-key-types' } From 1827bce2003438c2bccc85c8758b6100d58e0528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Tue, 21 May 2024 14:10:36 +0200 Subject: [PATCH 6/7] Ran Set-AVMModule --- .../document-db/database-account/README.md | 31 ++++++++++++++++ .../document-db/database-account/main.json | 36 +++++++++++++++---- .../sql-database/container/README.md | 17 ++++++++- .../sql-database/container/main.json | 18 +++++++--- .../database-account/sql-database/main.json | 23 +++++++++--- 5 files changed, 109 insertions(+), 16 deletions(-) diff --git a/avm/res/document-db/database-account/README.md b/avm/res/document-db/database-account/README.md index 30434814bc..4df6c2c3c6 100644 --- a/avm/res/document-db/database-account/README.md +++ b/avm/res/document-db/database-account/README.md @@ -1742,6 +1742,14 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: 'myPartitionKey1' ] } + { + kind: 'Hash' + name: 'container-005' + paths: [ + 'myPartitionKey1' + ] + version: 2 + } ] name: 'all-partition-key-types' } @@ -2020,6 +2028,14 @@ module databaseAccount 'br/public:avm/res/document-db/database-account: "paths": [ "myPartitionKey1" ] + }, + { + "kind": "Hash", + "name": "container-005", + "paths": [ + "myPartitionKey1" + ], + "version": 2 } ], "name": "all-partition-key-types" @@ -3384,6 +3400,7 @@ Array of containers to deploy in the SQL database. | [`kind`](#parameter-sqldatabasescontainerskind) | string | Default to Hash. Indicates the kind of algorithm used for partitioning. | | [`throughput`](#parameter-sqldatabasescontainersthroughput) | int | Default to 400. Request Units per second. Will be ignored if autoscaleSettingsMaxThroughput is used. | | [`uniqueKeyPolicyKeys`](#parameter-sqldatabasescontainersuniquekeypolicykeys) | array | The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. | +| [`version`](#parameter-sqldatabasescontainersversion) | int | Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition. | ### Parameter: `sqlDatabases.containers.name` @@ -3516,6 +3533,20 @@ List of paths must be unique for each document in the Azure Cosmos DB service - Required: Yes - Type: array +### Parameter: `sqlDatabases.containers.version` + +Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition. + +- Required: No +- Type: int +- Allowed: + ```Bicep + [ + 1 + 2 + ] + ``` + ### Parameter: `sqlDatabases.throughput` Default to 400. Request units per second. Will be ignored if autoscaleSettingsMaxThroughput is used. diff --git a/avm/res/document-db/database-account/main.json b/avm/res/document-db/database-account/main.json index 49bb26bba9..da552ea6b8 100644 --- a/avm/res/document-db/database-account/main.json +++ b/avm/res/document-db/database-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "13227324731926560272" + "templateHash": "16997519508574421280" }, "name": "DocumentDB Database Accounts", "description": "This module deploys a DocumentDB Database Account.", @@ -587,6 +587,17 @@ "description": "Optional. Default to Hash. Indicates the kind of algorithm used for partitioning." } }, + "version": { + "type": "int", + "allowedValues": [ + 1, + 2 + ], + "nullable": true, + "metadata": { + "description": "Optional. Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition." + } + }, "throughput": { "type": "int", "nullable": true, @@ -1250,7 +1261,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "15534269553484112693" + "templateHash": "8319829662998768775" }, "name": "DocumentDB Database Account SQL Databases", "description": "This module deploys a SQL Database in a CosmosDB Account.", @@ -1364,6 +1375,9 @@ "kind": { "value": "[tryGet(parameters('containers')[copyIndex()], 'kind')]" }, + "version": { + "value": "[tryGet(parameters('containers')[copyIndex()], 'version')]" + }, "paths": { "value": "[tryGet(parameters('containers')[copyIndex()], 'paths')]" }, @@ -1380,7 +1394,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "12755071159425783033" + "templateHash": "3824205620211058652" }, "name": "DocumentDB Database Account SQL Database Containers", "description": "This module deploys a SQL Database Container in a CosmosDB Account.", @@ -1480,12 +1494,22 @@ "defaultValue": "Hash", "allowedValues": [ "Hash", - "MultiHash", - "Range" + "MultiHash" ], "metadata": { "description": "Optional. Default to Hash. Indicates the kind of algorithm used for partitioning." } + }, + "version": { + "type": "int", + "defaultValue": 1, + "allowedValues": [ + 1, + 2 + ], + "metadata": { + "description": "Optional. Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition." + } } }, "variables": { @@ -1496,7 +1520,7 @@ "input": "[if(startsWith(parameters('paths')[copyIndex('partitionKeyPaths')], '/'), parameters('paths')[copyIndex('partitionKeyPaths')], format('/{0}', parameters('paths')[copyIndex('partitionKeyPaths')]))]" } ], - "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'Range'), 1, 2)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" + "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'MultiHash'), 2, parameters('version'))), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" }, "resources": { "databaseAccount::sqlDatabase": { diff --git a/avm/res/document-db/database-account/sql-database/container/README.md b/avm/res/document-db/database-account/sql-database/container/README.md index c8227d7ff2..122e23a6fd 100644 --- a/avm/res/document-db/database-account/sql-database/container/README.md +++ b/avm/res/document-db/database-account/sql-database/container/README.md @@ -46,6 +46,7 @@ This module deploys a SQL Database Container in a CosmosDB Account. | [`tags`](#parameter-tags) | object | Tags of the SQL Database resource. | | [`throughput`](#parameter-throughput) | int | Default to 400. Request Units per second. Will be ignored if autoscaleSettingsMaxThroughput is used. | | [`uniqueKeyPolicyKeys`](#parameter-uniquekeypolicykeys) | array | The unique key policy configuration containing a list of unique keys that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. | +| [`version`](#parameter-version) | int | Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition. | ### Parameter: `name` @@ -126,7 +127,6 @@ Default to Hash. Indicates the kind of algorithm used for partitioning. [ 'Hash' 'MultiHash' - 'Range' ] ``` @@ -153,6 +153,21 @@ The unique key policy configuration containing a list of unique keys that enforc - Type: array - Default: `[]` +### Parameter: `version` + +Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition. + +- Required: No +- Type: int +- Default: `1` +- Allowed: + ```Bicep + [ + 1 + 2 + ] + ``` + ## Outputs diff --git a/avm/res/document-db/database-account/sql-database/container/main.json b/avm/res/document-db/database-account/sql-database/container/main.json index bab8d0f49b..f882248bfc 100644 --- a/avm/res/document-db/database-account/sql-database/container/main.json +++ b/avm/res/document-db/database-account/sql-database/container/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "6183061195345158504" + "templateHash": "3824205620211058652" }, "name": "DocumentDB Database Account SQL Database Containers", "description": "This module deploys a SQL Database Container in a CosmosDB Account.", @@ -106,12 +106,22 @@ "defaultValue": "Hash", "allowedValues": [ "Hash", - "MultiHash", - "Range" + "MultiHash" ], "metadata": { "description": "Optional. Default to Hash. Indicates the kind of algorithm used for partitioning." } + }, + "version": { + "type": "int", + "defaultValue": 1, + "allowedValues": [ + 1, + 2 + ], + "metadata": { + "description": "Optional. Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition." + } } }, "variables": { @@ -122,7 +132,7 @@ "input": "[if(startsWith(parameters('paths')[copyIndex('partitionKeyPaths')], '/'), parameters('paths')[copyIndex('partitionKeyPaths')], format('/{0}', parameters('paths')[copyIndex('partitionKeyPaths')]))]" } ], - "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'Range'), 1, 2)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" + "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'MultiHash'), 2, parameters('version'))), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" }, "resources": { "databaseAccount::sqlDatabase": { diff --git a/avm/res/document-db/database-account/sql-database/main.json b/avm/res/document-db/database-account/sql-database/main.json index 0d51fe224d..3bce557b29 100644 --- a/avm/res/document-db/database-account/sql-database/main.json +++ b/avm/res/document-db/database-account/sql-database/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "14993962216021395679" + "templateHash": "8319829662998768775" }, "name": "DocumentDB Database Account SQL Databases", "description": "This module deploys a SQL Database in a CosmosDB Account.", @@ -120,6 +120,9 @@ "kind": { "value": "[tryGet(parameters('containers')[copyIndex()], 'kind')]" }, + "version": { + "value": "[tryGet(parameters('containers')[copyIndex()], 'version')]" + }, "paths": { "value": "[tryGet(parameters('containers')[copyIndex()], 'paths')]" }, @@ -136,7 +139,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "6183061195345158504" + "templateHash": "3824205620211058652" }, "name": "DocumentDB Database Account SQL Database Containers", "description": "This module deploys a SQL Database Container in a CosmosDB Account.", @@ -236,12 +239,22 @@ "defaultValue": "Hash", "allowedValues": [ "Hash", - "MultiHash", - "Range" + "MultiHash" ], "metadata": { "description": "Optional. Default to Hash. Indicates the kind of algorithm used for partitioning." } + }, + "version": { + "type": "int", + "defaultValue": 1, + "allowedValues": [ + 1, + 2 + ], + "metadata": { + "description": "Optional. Default to 1 for Hash and 2 for MultiHash - 1 is not allowed for MultiHash. Version of the partition key definition." + } } }, "variables": { @@ -252,7 +265,7 @@ "input": "[if(startsWith(parameters('paths')[copyIndex('partitionKeyPaths')], '/'), parameters('paths')[copyIndex('partitionKeyPaths')], format('/{0}', parameters('paths')[copyIndex('partitionKeyPaths')]))]" } ], - "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'Range'), 1, 2)), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" + "containerResourceParams": "[union(createObject('conflictResolutionPolicy', parameters('conflictResolutionPolicy'), 'defaultTtl', parameters('defaultTtl'), 'id', parameters('name'), 'indexingPolicy', if(not(empty(parameters('indexingPolicy'))), parameters('indexingPolicy'), null()), 'partitionKey', createObject('paths', variables('partitionKeyPaths'), 'kind', parameters('kind'), 'version', if(equals(parameters('kind'), 'MultiHash'), 2, parameters('version'))), 'uniqueKeyPolicy', if(not(empty(parameters('uniqueKeyPolicyKeys'))), createObject('uniqueKeys', parameters('uniqueKeyPolicyKeys')), null())), if(not(equals(parameters('analyticalStorageTtl'), 0)), createObject('analyticalStorageTtl', parameters('analyticalStorageTtl')), createObject()))]" }, "resources": { "databaseAccount::sqlDatabase": { From 86e5197d00d7057d33967cb539a9c92596233dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20B=C3=B8g=20Andersen?= Date: Tue, 21 May 2024 20:37:13 +0200 Subject: [PATCH 7/7] Another Set-AVMModule --- avm/res/document-db/database-account/main.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avm/res/document-db/database-account/main.json b/avm/res/document-db/database-account/main.json index 1fe28bb41c..ec16d7c7a8 100644 --- a/avm/res/document-db/database-account/main.json +++ b/avm/res/document-db/database-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.27.1.19265", - "templateHash": "8399904898851436683" + "templateHash": "5516885052191994610" }, "name": "DocumentDB Database Accounts", "description": "This module deploys a DocumentDB Database Account.",