forked from Azure/azure-quickstart-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azuredeploy.json
76 lines (76 loc) · 2.47 KB
/
azuredeploy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"cdnApiVersion":"2015-06-01",
"storageApiVersion":"2015-06-15"
},
"parameters": {
"storageAccountName": {
"type": "string",
"metadata": {
"description": "Name of the Storage Account"
}
},
"profileName": {
"type": "string",
"metadata": {
"description": "Name of the CDN Profile"
}
},
"endpointName": {
"type": "string",
"metadata": {
"description": "Name of the CDN Endpoint"
}
}
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('storageAccountName')]",
"apiVersion": "[variables('storageApiVersion')]",
"location": "[resourceGroup().location]",
"properties": {
"accountType": "Standard_LRS"
}
},
{
"name": "[parameters('profileName')]",
"type": "Microsoft.Cdn/profiles",
"location": "[resourceGroup().location]",
"apiVersion": "[variables('cdnApiVersion')]",
"properties": {
"sku": {
"name": "Standard"
}
}
},
{
"apiVersion": "[variables('cdnApiVersion')]",
"dependsOn": [
"[concat('Microsoft.Cdn/profiles/', parameters('profileName'))]",
"[concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName'))]"
],
"location": "[resourceGroup().location]",
"name": "[concat(parameters('profileName'),'/',parameters('endpointName'))]",
"type": "Microsoft.Cdn/profiles/endpoints",
"properties": {
"originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]",
"isHttpAllowed": true,
"isHttpsAllowed": true,
"queryStringCachingBehavior": "IgnoreQueryString",
"contentTypesToCompress": [ "text/plain", "text/html", "text/css", "application/x-javascript", "text/javascript" ],
"isCompressionEnabled": "True",
"origins": [
{
"name": "origin1",
"properties": {
"hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]"
}
}
]
}
}
]
}