Last active
January 30, 2024 20:11
-
-
Save markjbrown/03d3640a2d915f5899b84e5927e4e589 to your computer and use it in GitHub Desktop.
Create a Cosmos DB free-tier account and database with 400 RU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"databaseAccount_free_tier_name": { | |
"defaultValue": "my-cosmos-account-name", | |
"type": "String" | |
} | |
}, | |
"variables": {}, | |
"resources": [ | |
{ | |
"type": "Microsoft.DocumentDB/databaseAccounts", | |
"apiVersion": "2020-03-01", | |
"name": "[parameters('databaseAccount_free_tier_name')]", | |
"location": "West US", | |
"tags": { | |
"defaultExperience": "Core (SQL)", | |
"CosmosAccountType": "Non-Production" | |
}, | |
"kind": "GlobalDocumentDB", | |
"properties": { | |
"enableFreeTier": true, | |
"publicNetworkAccess": "Enabled", | |
"enableAutomaticFailover": false, | |
"enableMultipleWriteLocations": false, | |
"isVirtualNetworkFilterEnabled": false, | |
"virtualNetworkRules": [], | |
"disableKeyBasedMetadataWriteAccess": false, | |
"databaseAccountOfferType": "Standard", | |
"consistencyPolicy": { | |
"defaultConsistencyLevel": "Session", | |
"maxIntervalInSeconds": 5, | |
"maxStalenessPrefix": 100 | |
}, | |
"locations": [ | |
{ | |
"locationName": "West US", | |
"provisioningState": "Succeeded", | |
"failoverPriority": 0, | |
"isZoneRedundant": false | |
} | |
], | |
"capabilities": [] | |
} | |
}, | |
{ | |
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases", | |
"apiVersion": "2020-03-01", | |
"name": "[concat(parameters('databaseAccount_free_tier_name'), '/database1')]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('databaseAccount_free_tier_name'))]" | |
], | |
"properties": { | |
"resource": { | |
"id": "database1" | |
}, | |
"options": {"throughput": 400} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment