Skip to content

Commit

Permalink
fix: Fixed typo in account throughput limit (#3952)
Browse files Browse the repository at this point in the history
## Description

Closes #3908 

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.document-db.database-account](https://github.com/bryansan-org/fork-bicep-registry-modules/actions/workflows/avm.res.document-db.database-account.yml/badge.svg?branch=fix%2Ftypo_in_account_limit)](https://github.com/bryansan-org/fork-bicep-registry-modules/actions/workflows/avm.res.document-db.database-account.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [x] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [x] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
bryansan-msft authored Dec 18, 2024
1 parent 4592a48 commit 01be40b
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "16994331830326213766"
"version": "0.32.4.45862",
"templateHash": "11166187042354172574"
},
"name": "DocumentDB Database Accounts Gremlin Databases Graphs",
"description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.",
Expand Down Expand Up @@ -58,10 +58,7 @@
"existing": true,
"type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
"apiVersion": "2023-04-15",
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]",
"dependsOn": [
"databaseAccount"
]
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]"
},
"databaseAccount": {
"existing": true,
Expand All @@ -82,10 +79,7 @@
"paths": "[if(not(empty(parameters('partitionKeyPaths'))), parameters('partitionKeyPaths'), null())]"
}
}
},
"dependsOn": [
"databaseAccount::gremlinDatabase"
]
}
}
},
"outputs": {
Expand Down
18 changes: 6 additions & 12 deletions avm/res/document-db/database-account/gremlin-database/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "6528096364275148764"
"version": "0.32.4.45862",
"templateHash": "9048997200136932160"
},
"name": "DocumentDB Database Account Gremlin Databases",
"description": "This module deploys a Gremlin Database within a CosmosDB Account.",
Expand Down Expand Up @@ -111,8 +111,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "16994331830326213766"
"version": "0.32.4.45862",
"templateHash": "11166187042354172574"
},
"name": "DocumentDB Database Accounts Gremlin Databases Graphs",
"description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.",
Expand Down Expand Up @@ -164,10 +164,7 @@
"existing": true,
"type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
"apiVersion": "2023-04-15",
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]",
"dependsOn": [
"databaseAccount"
]
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]"
},
"databaseAccount": {
"existing": true,
Expand All @@ -188,10 +185,7 @@
"paths": "[if(not(empty(parameters('partitionKeyPaths'))), parameters('partitionKeyPaths'), null())]"
}
}
},
"dependsOn": [
"databaseAccount::gremlinDatabase"
]
}
}
},
"outputs": {
Expand Down
2 changes: 1 addition & 1 deletion avm/res/document-db/database-account/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ var databaseAccountProperties = union(
capabilities: capabilities
minimalTlsVersion: minimumTlsVersion
capacity: {
totalThrougputLimit: totalThroughputLimit
totalThroughputLimit: totalThroughputLimit
}
},
((!empty(sqlDatabases) || !empty(mongodbDatabases) || !empty(gremlinDatabases) || !empty(tables))
Expand Down
72 changes: 30 additions & 42 deletions avm/res/document-db/database-account/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "10855021340496431236"
"version": "0.32.4.45862",
"templateHash": "16155049665849608519"
},
"name": "DocumentDB Database Accounts",
"description": "This module deploys a DocumentDB Database Account.",
Expand Down Expand Up @@ -1250,7 +1250,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'))))]",
"databaseAccountProperties": "[union(createObject('databaseAccountOfferType', parameters('databaseAccountOfferType'), 'backupPolicy', variables('backupPolicy'), 'capabilities', variables('capabilities'), 'minimalTlsVersion', parameters('minimumTlsVersion'), 'capacity', createObject('totalThrougputLimit', parameters('totalThroughputLimit'))), if(or(or(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('mongodbDatabases')))), not(empty(parameters('gremlinDatabases')))), not(empty(parameters('tables')))), 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'), 'None'), 'publicNetworkAccess', coalesce(tryGet(parameters('networkRestrictions'), 'publicNetworkAccess'), 'Disabled'), 'isVirtualNetworkFilterEnabled', or(not(empty(variables('ipRules'))), not(empty(variables('virtualNetworkRules')))), 'enableFreeTier', parameters('enableFreeTier'), 'enableAutomaticFailover', parameters('automaticFailover'), 'enableAnalyticalStorage', parameters('enableAnalyticalStorage')), createObject()), if(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('tables')))), 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'), 'backupPolicy', variables('backupPolicy'), 'capabilities', variables('capabilities'), 'minimalTlsVersion', parameters('minimumTlsVersion'), 'capacity', createObject('totalThroughputLimit', parameters('totalThroughputLimit'))), if(or(or(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('mongodbDatabases')))), not(empty(parameters('gremlinDatabases')))), not(empty(parameters('tables')))), 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'), 'None'), 'publicNetworkAccess', coalesce(tryGet(parameters('networkRestrictions'), 'publicNetworkAccess'), 'Disabled'), 'isVirtualNetworkFilterEnabled', or(not(empty(variables('ipRules'))), not(empty(variables('virtualNetworkRules')))), 'enableFreeTier', parameters('enableFreeTier'), 'enableAutomaticFailover', parameters('automaticFailover'), 'enableAnalyticalStorage', parameters('enableAnalyticalStorage')), createObject()), if(or(not(empty(parameters('sqlDatabases'))), not(empty(parameters('tables')))), 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')]",
Expand Down Expand Up @@ -1409,8 +1409,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "14039021912249335209"
"version": "0.32.4.45862",
"templateHash": "13891951858408318693"
},
"name": "DocumentDB Database Account SQL Databases",
"description": "This module deploys a SQL Database in a CosmosDB Account.",
Expand Down Expand Up @@ -1542,8 +1542,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "1471754747460263407"
"version": "0.32.4.45862",
"templateHash": "10312240160742899636"
},
"name": "DocumentDB Database Account SQL Database Containers",
"description": "This module deploys a SQL Database Container in a CosmosDB Account.",
Expand Down Expand Up @@ -1676,10 +1676,7 @@
"existing": true,
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"apiVersion": "2023-04-15",
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]",
"dependsOn": [
"databaseAccount"
]
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]"
},
"databaseAccount": {
"existing": true,
Expand All @@ -1697,7 +1694,7 @@
"options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(and(equals(parameters('autoscaleSettingsMaxThroughput'), null()), not(equals(parameters('throughput'), -1))), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), null())), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
},
"dependsOn": [
"databaseAccount::sqlDatabase"
"databaseAccount"
]
}
},
Expand Down Expand Up @@ -1799,8 +1796,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "3860121931480041680"
"version": "0.32.4.45862",
"templateHash": "5835214316063453536"
},
"name": "DocumentDB Database Account SQL Role.",
"description": "This module deploys SQL Role Definision and Assignment in a CosmosDB Account.",
Expand Down Expand Up @@ -1886,8 +1883,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "2222650596260487600"
"version": "0.32.4.45862",
"templateHash": "2988995240332079717"
},
"name": "DocumentDB Database Account SQL Role Definitions.",
"description": "This module deploys a SQL Role Definision in a CosmosDB Account.",
Expand Down Expand Up @@ -2007,8 +2004,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "12993275952067538651"
"version": "0.32.4.45862",
"templateHash": "14595063605642768334"
},
"name": "DocumentDB Database Account SQL Role Assignments.",
"description": "This module deploys a SQL Role Assignment in a CosmosDB Account.",
Expand Down Expand Up @@ -2121,8 +2118,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "18295016247574474595"
"version": "0.32.4.45862",
"templateHash": "12201850926589437696"
},
"name": "DocumentDB Database Account MongoDB Databases",
"description": "This module deploys a MongoDB Database within a CosmosDB Account.",
Expand Down Expand Up @@ -2224,8 +2221,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "9799909568020880663"
"version": "0.32.4.45862",
"templateHash": "6624674794933817904"
},
"name": "DocumentDB Database Account MongoDB Database Collections",
"description": "This module deploys a MongoDB Database Collection.",
Expand Down Expand Up @@ -2384,8 +2381,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "6528096364275148764"
"version": "0.32.4.45862",
"templateHash": "9048997200136932160"
},
"name": "DocumentDB Database Account Gremlin Databases",
"description": "This module deploys a Gremlin Database within a CosmosDB Account.",
Expand Down Expand Up @@ -2490,8 +2487,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "16994331830326213766"
"version": "0.32.4.45862",
"templateHash": "11166187042354172574"
},
"name": "DocumentDB Database Accounts Gremlin Databases Graphs",
"description": "This module deploys a DocumentDB Database Accounts Gremlin Database Graph.",
Expand Down Expand Up @@ -2543,10 +2540,7 @@
"existing": true,
"type": "Microsoft.DocumentDB/databaseAccounts/gremlinDatabases",
"apiVersion": "2023-04-15",
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]",
"dependsOn": [
"databaseAccount"
]
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('gremlinDatabaseName'))]"
},
"databaseAccount": {
"existing": true,
Expand All @@ -2567,10 +2561,7 @@
"paths": "[if(not(empty(parameters('partitionKeyPaths'))), parameters('partitionKeyPaths'), null())]"
}
}
},
"dependsOn": [
"databaseAccount::gremlinDatabase"
]
}
}
},
"outputs": {
Expand Down Expand Up @@ -2669,8 +2660,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "6722170581524078621"
"version": "0.32.4.45862",
"templateHash": "424696651537600433"
},
"name": "Azure Cosmos DB account tables",
"description": "This module deploys a table within an Azure Cosmos DB Account.",
Expand Down Expand Up @@ -3556,8 +3547,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "7954388693868310378"
"version": "0.32.4.45862",
"templateHash": "13365107869204248001"
}
},
"definitions": {
Expand Down Expand Up @@ -3633,10 +3624,7 @@
"name": "[format('{0}/{1}', parameters('keyVaultName'), parameters('secretsToSet')[copyIndex()].name)]",
"properties": {
"value": "[parameters('secretsToSet')[copyIndex()].value]"
},
"dependsOn": [
"keyVault"
]
}
}
},
"outputs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "9799909568020880663"
"version": "0.32.4.45862",
"templateHash": "6624674794933817904"
},
"name": "DocumentDB Database Account MongoDB Database Collections",
"description": "This module deploys a MongoDB Database Collection.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "18295016247574474595"
"version": "0.32.4.45862",
"templateHash": "12201850926589437696"
},
"name": "DocumentDB Database Account MongoDB Databases",
"description": "This module deploys a MongoDB Database within a CosmosDB Account.",
Expand Down Expand Up @@ -108,8 +108,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "9799909568020880663"
"version": "0.32.4.45862",
"templateHash": "6624674794933817904"
},
"name": "DocumentDB Database Account MongoDB Database Collections",
"description": "This module deploys a MongoDB Database Collection.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.92.45157",
"templateHash": "1471754747460263407"
"version": "0.32.4.45862",
"templateHash": "10312240160742899636"
},
"name": "DocumentDB Database Account SQL Database Containers",
"description": "This module deploys a SQL Database Container in a CosmosDB Account.",
Expand Down Expand Up @@ -139,10 +139,7 @@
"existing": true,
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases",
"apiVersion": "2023-04-15",
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]",
"dependsOn": [
"databaseAccount"
]
"name": "[format('{0}/{1}', parameters('databaseAccountName'), parameters('sqlDatabaseName'))]"
},
"databaseAccount": {
"existing": true,
Expand All @@ -160,7 +157,7 @@
"options": "[if(contains(reference('databaseAccount').capabilities, createObject('name', 'EnableServerless')), null(), createObject('throughput', if(and(equals(parameters('autoscaleSettingsMaxThroughput'), null()), not(equals(parameters('throughput'), -1))), parameters('throughput'), null()), 'autoscaleSettings', if(not(equals(parameters('autoscaleSettingsMaxThroughput'), null())), createObject('maxThroughput', parameters('autoscaleSettingsMaxThroughput')), null())))]"
},
"dependsOn": [
"databaseAccount::sqlDatabase"
"databaseAccount"
]
}
},
Expand Down
Loading

0 comments on commit 01be40b

Please sign in to comment.