35
35
"description" : " The location of the resource. By default, this is the same as the resource group."
36
36
}
37
37
},
38
- "hsmLocation" : {
39
- "type" : " string" ,
40
- "defaultValue" : " southcentralus" ,
41
- "allowedValues" : [
42
- " australiacentral" ,
43
- " canadacentral" ,
44
- " centralus" ,
45
- " eastasia" ,
46
- " eastus2" ,
47
- " koreacentral" ,
48
- " northeurope" ,
49
- " southafricanorth" ,
50
- " southcentralus" ,
51
- " southeastasia" ,
52
- " switzerlandnorth" ,
53
- " uksouth" ,
54
- " westeurope" ,
55
- " westus"
56
- ],
57
- "metadata" : {
58
- "description" : " The location of the Managed HSM. By default, this is 'southcentralus'."
59
- }
60
- },
61
- "enableHsm" : {
62
- "type" : " bool" ,
63
- "defaultValue" : false ,
64
- "metadata" : {
65
- "description" : " Whether to enable deployment of Managed HSM. The default is false."
66
- }
67
- },
68
38
"keyVaultSku" : {
69
39
"type" : " string" ,
70
40
"defaultValue" : " premium" ,
71
41
"metadata" : {
72
42
"description" : " Key Vault SKU to deploy. The default is 'premium'"
73
43
}
74
- },
75
- "attestationImage" : {
76
- "type" : " string" ,
77
- "defaultValue" : " keyvault-mock-attestation:latest" ,
78
- "metadata" : {
79
- "description" : " The container image name and tag to use for the attestation mock service."
80
- }
81
44
}
82
45
},
83
46
"variables" : {
84
- "attestationFarm" : " [concat(parameters('baseName'), 'farm')]" ,
85
- "attestationSite" : " [concat(parameters('baseName'), 'site')]" ,
86
- "attestationUri" : " [concat('DOCKER|azsdkengsys.azurecr.io/', parameters('attestationImage'))]" ,
87
47
"kvApiVersion" : " 2019-09-01" ,
88
48
"kvName" : " [parameters('baseName')]" ,
89
- "hsmApiVersion" : " 2021-04-01-preview" ,
90
- "hsmName" : " [concat(parameters('baseName'), 'hsm')]" ,
91
49
"mgmtApiVersion" : " 2019-04-01" ,
92
- "blobContainerName" : " backup" ,
93
- "primaryAccountName" : " [concat(parameters('baseName'), 'prim')]" ,
94
50
"encryption" : {
95
51
"services" : {
96
52
"blob" : {
180
136
"enableSoftDelete" : true ,
181
137
"softDeleteRetentionInDays" : 7
182
138
}
183
- },
184
- {
185
- "type" : " Microsoft.KeyVault/managedHSMs" ,
186
- "apiVersion" : " [variables('hsmApiVersion')]" ,
187
- "name" : " [variables('hsmName')]" ,
188
- "condition" : " [parameters('enableHsm')]" ,
189
- "location" : " [parameters('hsmLocation')]" ,
190
- "sku" : {
191
- "family" : " B" ,
192
- "name" : " Standard_B1"
193
- },
194
- "properties" : {
195
- "tenantId" : " [parameters('tenantId')]" ,
196
- "initialAdminObjectIds" : " [union(array(parameters('testApplicationOid')), array(parameters('provisionerApplicationOid')))]" ,
197
- "enablePurgeProtection" : false ,
198
- "enableSoftDelete" : true ,
199
- "softDeleteRetentionInDays" : 7 ,
200
- "publicNetworkAccess" : " Enabled" ,
201
- "networkAcls" : " [variables('networkAcls')]"
202
- }
203
- },
204
- {
205
- "type" : " Microsoft.Storage/storageAccounts" ,
206
- "apiVersion" : " [variables('mgmtApiVersion')]" ,
207
- "name" : " [variables('primaryAccountName')]" ,
208
- "location" : " [parameters('location')]" ,
209
- "sku" : {
210
- "name" : " Standard_RAGRS" ,
211
- "tier" : " Standard"
212
- },
213
- "kind" : " StorageV2" ,
214
- "properties" : {
215
- "networkAcls" : " [variables('networkAcls')]" ,
216
- "supportsHttpsTrafficOnly" : true ,
217
- "encryption" : " [variables('encryption')]" ,
218
- "accessTier" : " Hot"
219
- }
220
- },
221
- {
222
- "type" : " Microsoft.Storage/storageAccounts/blobServices" ,
223
- "apiVersion" : " 2019-06-01" ,
224
- "name" : " [concat(variables('primaryAccountName'), '/default')]" ,
225
- "dependsOn" : [
226
- " [resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName'))]"
227
- ],
228
- "sku" : {
229
- "name" : " Standard_RAGRS" ,
230
- "tier" : " Standard"
231
- },
232
- "properties" : {
233
- "cors" : {
234
- "corsRules" : []
235
- },
236
- "deleteRetentionPolicy" : {
237
- "enabled" : false
238
- }
239
- }
240
- },
241
- {
242
- "type" : " Microsoft.Storage/storageAccounts/blobServices/containers" ,
243
- "apiVersion" : " 2019-06-01" ,
244
- "name" : " [concat(variables('primaryAccountName'), '/default/', variables('blobContainerName'))]" ,
245
- "dependsOn" : [
246
- " [resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('primaryAccountName'), 'default')]" ,
247
- " [resourceId('Microsoft.Storage/storageAccounts', variables('primaryAccountName'))]"
248
- ],
249
- "properties" : {
250
- "publicAccess" : " None"
251
- }
252
- },
253
- {
254
-
255
- "type" : " Microsoft.Web/serverfarms" ,
256
- "apiVersion" : " 2020-12-01" ,
257
- "name" : " [variables('attestationFarm')]" ,
258
- "condition" : " [parameters('enableHsm')]" ,
259
- "location" : " [parameters('location')]" ,
260
- "kind" : " linux" ,
261
- "sku" : {
262
- "name" : " B1"
263
- },
264
- "properties" : {
265
- "reserved" : true
266
- }
267
- },
268
- {
269
-
270
- "type" : " Microsoft.Web/sites" ,
271
- "apiVersion" : " 2020-12-01" ,
272
- "name" : " [variables('attestationSite')]" ,
273
- "condition" : " [parameters('enableHsm')]" ,
274
- "dependsOn" : [
275
- " [resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]"
276
- ],
277
- "location" : " [parameters('location')]" ,
278
- "properties" : {
279
- "httpsOnly" : true ,
280
- "serverFarmId" : " [resourceId('Microsoft.Web/serverfarms', variables('attestationFarm'))]" ,
281
- "siteConfig" : {
282
- "name" : " [variables('attestationSite')]" ,
283
- "alwaysOn" : true ,
284
- "linuxFxVersion" : " [variables('attestationUri')]" ,
285
- "appSettings" : [
286
- {
287
- "name" : " WEBSITES_ENABLE_APP_SERVICE_STORAGE" ,
288
- "value" : " false"
289
- }
290
- ]
291
- }
292
- }
293
139
}
294
140
],
295
141
"outputs" : {
296
142
"AZURE_KEYVAULT_URL" : {
297
143
"type" : " string" ,
298
144
"value" : " [reference(variables('kvName')).vaultUri]"
299
145
},
300
- "AZURE_MANAGEDHSM_URL" : {
301
- "type" : " string" ,
302
- "condition" : " [parameters('enableHsm')]" ,
303
- "value" : " [reference(variables('hsmName')).hsmUri]"
304
- },
305
146
"KEYVAULT_SKU" : {
306
147
"type" : " string" ,
307
148
"value" : " [reference(parameters('baseName')).sku.name]"
308
149
},
309
150
"CLIENT_OBJECTID" : {
310
151
"type" : " string" ,
311
152
"value" : " [parameters('testApplicationOid')]"
312
- },
313
- "BLOB_STORAGE_ACCOUNT_NAME" : {
314
- "type" : " string" ,
315
- "value" : " [variables('primaryAccountName')]"
316
- },
317
- "BLOB_PRIMARY_STORAGE_ACCOUNT_KEY" : {
318
- "type" : " string" ,
319
- "value" : " [listKeys(variables('primaryAccountName'), variables('mgmtApiVersion')).keys[0].value]"
320
- },
321
- "BLOB_CONTAINER_NAME" : {
322
- "type" : " string" ,
323
- "value" : " [variables('blobContainerName')]"
324
- },
325
- "AZURE_KEYVAULT_ATTESTATION_URL" : {
326
- "type" : " string" ,
327
- "condition" : " [parameters('enableHsm')]" ,
328
- "value" : " [format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]"
329
153
}
330
154
}
331
155
}
0 commit comments