From f3b40bee844f7bdc96fac7dbf7c5d1e030d8eb67 Mon Sep 17 00:00:00 2001 From: samuel Date: Thu, 20 Apr 2023 12:26:58 +0930 Subject: [PATCH 1/5] add enable free tier tag --- modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep | 4 ++++ modules/Microsoft.DocumentDB/databaseAccounts/readme.md | 1 + 2 files changed, 5 insertions(+) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index 40b98067e5..ffb2fc4225 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -35,6 +35,9 @@ param defaultConsistencyLevel string = 'Session' @description('Optional. Enable automatic failover for regions.') param automaticFailover bool = true +@description('Optional. Enable free tier') +param enableFreeTier bool = false + @minValue(10) @maxValue(2147483647) @description('Optional. Max stale requests. Required for BoundedStaleness. Valid ranges, Single Region: 10 to 1000000. Multi Region: 100000 to 1000000.') @@ -257,6 +260,7 @@ var databaseAccount_properties = union({ consistencyPolicy: consistencyPolicy[defaultConsistencyLevel] locations: databaseAccount_locations capabilities: capabilities + enableFreeTier: enableFreeTier backupPolicy: backupPolicy } : {}), (!empty(sqlDatabases) ? { // SQLDB properties diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md index be167f75f2..9a43bbab0f 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -39,6 +39,7 @@ 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. | +| `enableFreeTier` | bool | `False` | | Enable free tier of cosmos db. | | `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'` | `[Continuous, Periodic]` | Describes the mode of backups. | From cd1750fc90a724d2652f475e86b1ee5d07479a45 Mon Sep 17 00:00:00 2001 From: samuel Date: Mon, 24 Apr 2023 12:47:49 +0930 Subject: [PATCH 2/5] fix description of enableFreeTier --- modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index ffb2fc4225..eee789e562 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -35,7 +35,7 @@ param defaultConsistencyLevel string = 'Session' @description('Optional. Enable automatic failover for regions.') param automaticFailover bool = true -@description('Optional. Enable free tier') +@description('Optional. Enable free tier.') param enableFreeTier bool = false @minValue(10) From 7c2da039fc1ae1dab63885ba32e9fb29d0557728 Mon Sep 17 00:00:00 2001 From: samuel Date: Mon, 24 Apr 2023 12:55:58 +0930 Subject: [PATCH 3/5] revert readme --- modules/Microsoft.DocumentDB/databaseAccounts/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md index 9a43bbab0f..be167f75f2 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -39,7 +39,6 @@ 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. | -| `enableFreeTier` | bool | `False` | | Enable free tier of cosmos db. | | `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'` | `[Continuous, Periodic]` | Describes the mode of backups. | From 1b82349ae7507b9e82c58a9c7ca2a5b4bfd865b9 Mon Sep 17 00:00:00 2001 From: samuel Date: Mon, 24 Apr 2023 13:02:34 +0930 Subject: [PATCH 4/5] update readme --- modules/Microsoft.DocumentDB/databaseAccounts/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md index be167f75f2..2851702aa0 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -56,6 +56,7 @@ 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 a Globally Unique Identifier (GUID). | +| `enableFreeTier` | bool | `False` | | Enable free tier. | | `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. | From 9af944f7c081fa73f4ead5a79e866192c0effcab Mon Sep 17 00:00:00 2001 From: samuel Date: Mon, 24 Apr 2023 17:01:14 +0930 Subject: [PATCH 5/5] Update description name of enableFreeTier flag --- modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep | 2 +- modules/Microsoft.DocumentDB/databaseAccounts/readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep b/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep index eee789e562..9b8685f293 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep +++ b/modules/Microsoft.DocumentDB/databaseAccounts/deploy.bicep @@ -35,7 +35,7 @@ param defaultConsistencyLevel string = 'Session' @description('Optional. Enable automatic failover for regions.') param automaticFailover bool = true -@description('Optional. Enable free tier.') +@description('Optional. Flag to indicate whether Free Tier is enabled.') param enableFreeTier bool = false @minValue(10) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md index 2851702aa0..9b7ef01a0f 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/readme.md +++ b/modules/Microsoft.DocumentDB/databaseAccounts/readme.md @@ -56,7 +56,7 @@ 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 a Globally Unique Identifier (GUID). | -| `enableFreeTier` | bool | `False` | | Enable free tier. | +| `enableFreeTier` | bool | `False` | | Flag to indicate whether Free Tier is enabled. | | `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. |