Skip to content

Commit 18241b4

Browse files
authored
Merge pull request #613 from shurd/updateLocationProperty
Update Cosmos DB schema to reflect new Location property
2 parents d9b8d2e + 1183f78 commit 18241b4

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

schemas/2015-04-08/Microsoft.DocumentDB.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,17 @@
277277
}
278278
],
279279
"description": "The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists."
280+
},
281+
"isZoneRedundant": {
282+
"oneOf": [
283+
{
284+
"type": "boolean"
285+
},
286+
{
287+
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
288+
}
289+
],
290+
"description": "Flag to indicate whether or not this region is an AvailabilityZone region"
280291
}
281292
},
282293
"description": "A region in which the Azure Cosmos DB database account is deployed."
@@ -287,6 +298,17 @@
287298
"id": {
288299
"type": "string",
289300
"description": "Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}."
301+
},
302+
"ignoreMissingVNetServiceEndpoint": {
303+
"oneOf": [
304+
{
305+
"type": "boolean"
306+
},
307+
{
308+
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
309+
}
310+
],
311+
"description": "Create firewall rule before the virtual network has vnet service endpoint enabled"
290312
}
291313
},
292314
"description": "Virtual Network ACL Rule object"

tests/2015-04-08/Microsoft.DocumentDB.tests.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,53 @@
8787
}
8888
}
8989
},
90+
{
91+
"name": "databaseAccounts - resource with zone redundant location",
92+
"definition": "https://schema.management.azure.com/schemas/2015-04-08/Microsoft.DocumentDB.json#/resourceDefinitions/databaseAccounts",
93+
"json": {
94+
"type": "Microsoft.DocumentDB/databaseAccounts",
95+
"apiVersion": "2015-04-08",
96+
"name": "test",
97+
"location": "West Us",
98+
"properties": {
99+
"locations": [
100+
{
101+
"locationName": "West Us",
102+
"failoverPriority": 0,
103+
"isZoneRedundant": true
104+
}
105+
],
106+
"databaseAccountOfferType": "Standard"
107+
}
108+
}
109+
},
110+
{
111+
"name": "databaseAccounts - resource with VNET",
112+
"definition": "https://schema.management.azure.com/schemas/2015-04-08/Microsoft.DocumentDB.json#/resourceDefinitions/databaseAccounts",
113+
"json": {
114+
"type": "Microsoft.DocumentDB/databaseAccounts",
115+
"apiVersion": "2015-04-08",
116+
"name": "test",
117+
"location": "West Us",
118+
"properties": {
119+
"locations": [
120+
{
121+
"locationName": "West Us",
122+
"failoverPriority": 0,
123+
"isZoneRedundant": true
124+
}
125+
],
126+
"virtualNetworkRules": [
127+
{
128+
"id": "/subscriptions/subId/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
129+
"ignoreMissingVNetServiceEndpoint": false
130+
}
131+
],
132+
"isVirtualNetworkFilterEnabled": true,
133+
"databaseAccountOfferType": "Standard"
134+
}
135+
}
136+
},
90137
{
91138
"name": "databaseAccounts - resource without properties property",
92139
"expectedErrors": [

0 commit comments

Comments
 (0)