Skip to content

Commit 37bebe3

Browse files
authored
Merge pull request #603 from jimmyca15/AzureAppConfiguration
Added Microsoft.AppConfiguration/configurationStores deployment template.
2 parents b415874 + 89e1231 commit 37bebe3

File tree

5 files changed

+150
-0
lines changed

5 files changed

+150
-0
lines changed

schemas/2014-04-01-preview/deploymentTemplate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
},
4141
{
4242
"oneOf": [
43+
{ "$ref": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#/resourceDefinitions/configurationStores" },
4344
{ "$ref": "https://schema.management.azure.com/schemas/2018-08-20-preview/Microsoft.HealthcareApis.json#/resourceDefinitions/services" },
4445
{ "$ref": "https://schema.management.azure.com/schemas/2017-08-01-preview/Microsoft.Genomics.json#/resourceDefinitions/accounts" },
4546
{ "$ref": "https://schema.management.azure.com/schemas/2018-08-01/Microsoft.Network.json#/resourceDefinitions/frontDoors" },

schemas/2015-01-01/deploymentTemplate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
},
5454
{
5555
"oneOf": [
56+
{ "$ref": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#/resourceDefinitions/configurationStores" },
5657
{ "$ref": "https://schema.management.azure.com/schemas/2018-08-20-preview/Microsoft.HealthcareApis.json#/resourceDefinitions/services" },
5758
{ "$ref": "https://schema.management.azure.com/schemas/2017-08-01-preview/Microsoft.Genomics.json#/resourceDefinitions/accounts" },
5859
{ "$ref": "https://schema.management.azure.com/schemas/2018-08-01/Microsoft.Network.json#/resourceDefinitions/frontDoors" },
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"id": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"title": "Microsoft.AppConfiguration",
5+
"description": "Microsoft AppConfiguration Resource Types",
6+
"resourceDefinitions": {
7+
"configurationStores": {
8+
"type": "object",
9+
"properties": {
10+
"name": {
11+
"oneOf": [
12+
{
13+
"type": "string",
14+
"pattern": "^[a-zA-Z0-9_-]*$"
15+
},
16+
{
17+
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
18+
}
19+
],
20+
"description": "The name of the configuration store."
21+
},
22+
"type": {
23+
"type": "string",
24+
"enum": [
25+
"Microsoft.AppConfiguration/configurationStores"
26+
]
27+
},
28+
"apiVersion": {
29+
"type": "string",
30+
"enum": [
31+
"2019-02-01-preview"
32+
]
33+
},
34+
"location": {
35+
"type": "string",
36+
"description": "The location of the resource. This cannot be changed after the resource is created."
37+
},
38+
"tags": {
39+
"oneOf": [
40+
{
41+
"type": "object",
42+
"additionalProperties": {
43+
"type": "string"
44+
}
45+
},
46+
{
47+
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
48+
}
49+
],
50+
"description": "The tags of the resource."
51+
},
52+
"properties": {
53+
"oneOf": [
54+
{
55+
"$ref": "#/definitions/ConfigurationStoreProperties"
56+
},
57+
{
58+
"$ref": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
59+
}
60+
],
61+
"description": "The properties of a configuration store."
62+
}
63+
},
64+
"required": [
65+
"name",
66+
"type",
67+
"apiVersion",
68+
"location",
69+
"properties"
70+
],
71+
"description": "Microsoft.AppConfiguration/configurationStores"
72+
}
73+
},
74+
"definitions": {
75+
"ConfigurationStoreProperties": {
76+
"description": "The properties of a configuration store."
77+
}
78+
}
79+
}

schemas/2019-04-01/deploymentTemplate.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
},
5454
{
5555
"oneOf": [
56+
{ "$ref": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#/resourceDefinitions/configurationStores" },
5657
{ "$ref": "https://schema.management.azure.com/schemas/2018-08-20-preview/Microsoft.HealthcareApis.json#/resourceDefinitions/services" },
5758
{ "$ref": "https://schema.management.azure.com/schemas/2017-08-01-preview/Microsoft.Genomics.json#/resourceDefinitions/accounts" },
5859
{ "$ref": "https://schema.management.azure.com/schemas/2018-08-01/Microsoft.Network.json#/resourceDefinitions/frontDoors" },
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"tests": [
3+
{
4+
"name": "Configuration Store",
5+
"definition": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#/resourceDefinitions/configurationStores",
6+
"json": {
7+
"name": "AppConfigurationStore",
8+
"type": "Microsoft.AppConfiguration/configurationStores",
9+
"apiVersion": "2019-02-01-preview",
10+
"location": "West US",
11+
"properties": {
12+
},
13+
"tags": {
14+
"myTag": "someValue"
15+
}
16+
}
17+
},
18+
{
19+
"name": "Configuration Store with invalid name",
20+
"definition": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#/resourceDefinitions/configurationStores",
21+
"json": {
22+
"name": "AppConfiguration.Store",
23+
"type": "Microsoft.AppConfiguration/configurationStores",
24+
"apiVersion": "2019-02-01-preview",
25+
"location": "West US",
26+
"properties": {
27+
}
28+
},
29+
"expectedErrors": [
30+
{
31+
"message": "Data does not match any schemas from \"oneOf\"",
32+
"dataPath": "/name",
33+
"schemaPath": "/properties/name/oneOf",
34+
"subErrors": [
35+
{
36+
"message": "String does not match pattern: ^[a-zA-Z0-9_-]*$",
37+
"dataPath": "/name",
38+
"schemaPath": "/properties/name/oneOf/0/pattern"
39+
},
40+
{
41+
"message": "String does not match pattern: ^\\[(json|if|and|or|not|concat|parameters|variables|deployment|reference|resourceId|resourceGroup|subscription|list.*|base64|providers|copyIndex|padLeft|replace|toLower|toUpper|startsWith|endsWith|length|split|skip|take|contains|intersection|union|first|last|indexOf|lastIndexOf|add|sub|mul|div|mod|min|max|range|string|int|float|bool|trim|uri|uniqueString|substring|base64ToString|base64ToJson|uriComponentToString|uriComponent|dataUriToString|dataUri|array|createArray|coalesce|empty|less|lessOrEquals|greater|greaterOrEquals|equals|[\\w\\$]+\\.[\\w\\$]+)\\(.*\\).*\\]$",
42+
"dataPath": "/name",
43+
"schemaPath": "/properties/name/oneOf/1/pattern"
44+
}
45+
]
46+
}
47+
]
48+
},
49+
{
50+
"name": "Configuration Store with missing location",
51+
"definition": "https://schema.management.azure.com/schemas/2019-02-01-preview/Microsoft.AppConfiguration.json#/resourceDefinitions/configurationStores",
52+
"json": {
53+
"name": "AppConfigurationStore",
54+
"type": "Microsoft.AppConfiguration/configurationStores",
55+
"apiVersion": "2019-02-01-preview",
56+
"properties": {
57+
}
58+
},
59+
"expectedErrors": [
60+
{
61+
"message": "Missing required property: location",
62+
"dataPath": "/",
63+
"schemaPath": "/required/3"
64+
}
65+
]
66+
}
67+
]
68+
}

0 commit comments

Comments
 (0)