-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazuredeploy.json
139 lines (137 loc) · 4.75 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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The Web app name that will be deployed"
}
},
"VtexAccountName": {
"type": "string",
"defaultValue": "{ACCOUNT_NAME}",
"metadata": {
"description": "Your Vtex Account Name - {ACCOUNT_NAME}.vtexcommercestable.com.br/api/oms/pvt/feed/orders/status"
}
},
"VtexAppKey": {
"type": "string",
"defaultValue": "{APP_KEY}"
},
"VtexAppToken": {
"type": "string",
"defaultValue": "{APP_TOKEN}"
}
},
"variables": {
"varsitename": "[replace(parameters('siteName'),' ','')]",
"hostingPlanName": "[toLower(concat(variables('varsitename'),'hostplan'))]",
"hostingPlanSku": "B1",
"repoUrl": "https://github.com/vtex/VtexOmsToAzureTable.git",
"GitBranch": "master",
"AzureLocation": "Central US",
"StorageName": "[toLower(concat(variables('varsitename'),'storage'))]",
"VtexAppToken": "[toLower(parameters('VtexAppToken'))]",
"VtexAppKey": "[toLower(parameters('VtexAppKey'))]",
"VarVtexAccountName": "[toLower(replace(parameters('VtexAccountName'),' ',''))]",
"AppInsightsName": "[toLower(concat(variables('varsitename'),'appinsights'))]",
"InsightsID": "[toLower(concat(variables('varsitename'),'appinsightsid'))]"
},
"resources": [
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('StorageName')]",
"location": "[variables('AzureLocation')]",
"properties": {
"accountType": "Standard_LRS"
}
},
{
"apiVersion": "2015-08-01",
"name": "[variables('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[variables('AzureLocation')]",
"tags": {
"displayName": "HostingPlan"
},
"sku": {
"name": "[variables('hostingPlanSku')]",
"capacity": "1"
},
"properties": {
"name": "[variables('hostingPlanName')]"
}
},
{
"apiVersion": "2014-04-01",
"location": "[variables('AzureLocation')]",
"name": "[variables('AppInsightsName')]",
"type": "Microsoft.Insights/components",
"properties": { "applicationId": "[variables('InsightsID')" }
},
{
"apiVersion": "2015-08-01",
"name": "[variables('varsitename')]",
"type": "Microsoft.Web/sites",
"location": "[variables('AzureLocation')]",
"dependsOn": [
"[concat('Microsoft.Web/serverFarms/', variables('hostingPlanName'))]",
"[concat('Microsoft.Insights/components/', variables('AppInsightsName'))]",
"[concat('Microsoft.Storage/storageAccounts/', variables('StorageName'))]"
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('hostingPlanName'))]": "VtexDashBoard"
},
"properties": {
"name": "[variables('varsitename')]",
"serverFarmId": "[variables('hostingPlanName')]"
},
"resources": [
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('varsitename'))]"
],
"tags": {
"displayName": "WebAppConfig"
},
"properties": {
"alwaysOn": true
}
},
{
"apiVersion": "2015-08-01",
"type": "config",
"name": "appsettings",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('varsitename'))]"
],
"properties": {
"vtexapptoken": "[variables('VtexAppToken')]",
"vtexappkey": "[variables('VtexAppKey')]",
"vtexaccountname": "[variables('VarVtexAccountName')]",
"storageconnectionstring": "[concat('DefaultEndpointsProtocol=https;AccountName=',variables('StorageName'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', variables('StorageName')), '2015-05-01-preview').key1,';')]",
"instrumentationkey": "[reference(concat('Microsoft.Insights/components/', variables('AppInsightsName'))).InstrumentationKey]"
}
},
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('varsitename'))]"
],
"properties": {
"RepoUrl": "[variables('repoUrl')]",
"branch": "[variables('GitBranch')]",
"IsManualIntegration": true
}
}
]
}
]
}