-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharm-template.json
163 lines (156 loc) · 7.39 KB
/
arm-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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"allowedValues": [
"centralus",
"eastus2",
"eastasia",
"westeurope",
"westus2"
],
"metadata": {
"description": "Location for your new Static Web Apps instance. Note that this parameter is different from 'Region' parameter above. 'Region' applies to Resource Group only, 'Location' applies to app instance itself."
}
},
"staticWebAppInstanceName": {
"type": "string",
"defaultValue": "[concat('static-web-app-',uniqueString(resourceGroup().id))]",
"metadata": {
"description": "Name for your new Static Web App instance."
}
},
"repositoryUrl": {
"type": "string",
"metadata": {
"description": "Full URL to your forked repo _without_ '.git' at the end. E.g. 'https://github.com/my-name/my-cognitive-search-static-web-apps-sample-ui-fork'"
}
},
"repositoryToken": {
"type": "securestring",
"metadata": {
"description": "Your GitHub Personal Access Token. Generate it as described here: https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token"
}
},
"searchServiceName": {
"type": "string",
"metadata": {
"description": "Your Azure Cognitive Search service instance name."
}
},
"searchIndexName": {
"type": "string",
"metadata": {
"description": "Your search index name. This index must exist in your Cognitive Search service."
}
},
"searchApiKey": {
"type": "securestring",
"metadata": {
"description": "Your query api-key. Find it on your Cognitive Search service's 'Keys' tab in Azure Portal."
}
},
"azureMapSubscriptionKey": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"description": "Ssubscription key for your Azure Maps account (Azure Maps is used for visualizing geolocation data). This value is optional. If not specified, the map will not be shown."
}
},
"cognitiveSearchKeyField": {
"type": "string",
"metadata": {
"description": "Name of the field in your search index, that uniquely identifies a document. E.g. 'HotelId'."
}
},
"cognitiveSearchNameField": {
"type": "string",
"metadata": {
"description": "Name of the field in your search index, that contains a short document title. E.g. 'HotelName'. You can also put a comma-delimited list of field names here, e.g. 'HotelName,Address'"
}
},
"cognitiveSearchGeoLocationField": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Name of the field in your search index, that contains geo coordinates for each document. E.g. 'Location'. The field type must be 'Edm.GeographyPoint'"
}
},
"cognitiveSearchOtherFields": {
"type": "string",
"metadata": {
"description": "Comma-separated list of other fields to be shown on search result cards. E.g. 'Tags,Description,Description_fr,Category,LastRenovationDate'"
}
},
"cognitiveSearchFacetFields": {
"type": "string",
"metadata": {
"description": "Comma-separated list of fields to be shown as facets on the left sidebar. If a field is an array-type field, append trailing star ('*') to its name. E.g. 'Tags*,Rating,Category,ParkingIncluded,LastRenovationDate1. All these fields must be facetable and filterable."
}
},
"cognitiveSearchTranscriptFields": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Comma-separated list of fields to be shown on the 'Transcript' tab of the Details dialog. E.g. 'HotelName,Description,Description_fr'. All these fields must be searchable. If not specified, that tab will simply show all string-type fields and get hit highlights from the search string."
}
},
"CognitiveSearchSuggesterName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Optional name of the autocomplete suggester to be used. E.g. 'sg'. Create and configure a suggester for your search index and put its name here - then the search query textbox will start showing suggestions as you type."
}
}
},
"resources": [
{
"apiVersion": "2021-01-15",
"name": "[parameters('staticWebAppInstanceName')]",
"type": "Microsoft.Web/staticSites",
"location": "[parameters('location')]",
"properties": {
"repositoryUrl": "[parameters('repositoryUrl')]",
"branch": "master",
"repositoryToken": "[parameters('repositoryToken')]",
"buildProperties": {
"appLocation": "/",
"apiLocation": "api",
"appArtifactLocation": "build"
}
},
"sku": {
"Tier": "Free",
"Name": "Free"
},
"resources":[
{
"apiVersion": "2021-01-15",
"name": "appsettings",
"type": "config",
"location": "[parameters('location')]",
"properties": {
"SWA_ENABLE_PROXIES_MANAGED_FUNCTIONS": "true",
"SearchServiceName": "[parameters('searchServiceName')]",
"SearchIndexName": "[parameters('searchIndexName')]",
"SearchApiKey": "[parameters('searchApiKey')]",
"AzureMapSubscriptionKey": "[parameters('azureMapSubscriptionKey')]",
"CognitiveSearchKeyField": "[parameters('cognitiveSearchKeyField')]",
"CognitiveSearchNameField": "[parameters('cognitiveSearchNameField')]",
"CognitiveSearchGeoLocationField": "[parameters('cognitiveSearchGeoLocationField')]",
"CognitiveSearchOtherFields": "[parameters('cognitiveSearchOtherFields')]",
"CognitiveSearchFacetFields": "[parameters('cognitiveSearchFacetFields')]",
"CognitiveSearchTranscriptFields": "[parameters('cognitiveSearchTranscriptFields')]",
"CognitiveSearchSuggesterName": "[parameters('cognitiveSearchSuggesterName')]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/staticSites', parameters('staticWebAppInstanceName'))]"
]
}
]
}
]
}