-
Notifications
You must be signed in to change notification settings - Fork 4
/
template.json
executable file
·121 lines (118 loc) · 4.71 KB
/
template.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.1.0.3",
"parameters": {
"storageAccount_name": {
"defaultValue": "[concat('site', uniqueString(resourceGroup().id))]",
"type": "String",
"metadata": {
"description": "Name of the storage account endpoint. To use the default value, do not specify your own value."
}
},
"cdn_profile_name": {
"defaultValue": "[concat('cdn-profile-', parameters('storageAccount_name'))]",
"type": "String",
"metadata": {
"description": "Name of the CDN profile. To use the default value, do not specify your own value."
}
},
"cdn_endpoint_name": {
"defaultValue": "[concat('cdn-endpoint-', parameters('storageAccount_name'))]",
"type": "String",
"metadata": {
"description": "Name of the CDN endpoint. To use the default value, do not specify your own value."
}
},
"cdn_endpoint_origin": {
"defaultValue": "[concat(parameters('storageAccount_name'), 'web.core.windows.net/$web/')]",
"type": "String",
"metadata": {
"description": "The static website endpoint of the storage account. This is currently incomplete and will need to be manually changed after deployment. The actual format of the endpoint should be https://<ACCOUNT_NAME>.<ZONE_NAME>.web.core.windows.net/ but there is currently no way to get the ZONE_NAME in an ARM template (see https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website)"
}
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Cdn/profiles",
"sku": {
"name": "Premium_Verizon"
},
"name": "[parameters('cdn_profile_name')]",
"apiVersion": "2016-04-02",
"location": "[resourceGroup().location]",
"tags": {},
"scale": null,
"properties": {
"provisioningState": "Succeeded",
"resourceState": "Active"
},
"dependsOn": []
},
{
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "StorageV2",
"name": "[parameters('storageAccount_name')]",
"apiVersion": "2018-07-01",
"location": "[resourceGroup().location]",
"tags": {},
"scale": null,
"properties": {
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": true,
"encryption": {
"services": {
"file": {
"enabled": true
},
"blob": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
},
"accessTier": "Hot"
},
"dependsOn": []
},
{
"type": "Microsoft.Cdn/profiles/endpoints",
"name": "[concat(parameters('cdn_profile_name'), '/', parameters('cdn_endpoint_name'))]",
"apiVersion": "2016-04-02",
"location": "[resourceGroup().location]",
"tags": {},
"scale": null,
"properties": {
"originHostHeader": "[parameters('cdn_endpoint_origin')]",
"isHttpAllowed": true,
"isHttpsAllowed": true,
"queryStringCachingBehavior": "NotSet",
"originPath": null,
"origins": [
{
"name": "[concat(parameters('cdn_endpoint_name'), '-origin-', uniqueString(resourceGroup().id))]",
"properties": {
"hostName": "[parameters('cdn_endpoint_origin')]",
"httpPort": 80,
"httpsPort": 443
}
}
],
"contentTypesToCompress": [],
"isCompressionEnabled": false
},
"dependsOn": [
"[resourceId('Microsoft.Cdn/profiles', parameters('cdn_profile_name'))]"
]
}
]
}