Skip to content

Commit 98ee5c2

Browse files
authored
Deploy mock attestation container (Azure#24573)
Resolves Azure#23515
1 parent b3f58b4 commit 98ee5c2

File tree

1 file changed

+48
-4
lines changed

1 file changed

+48
-4
lines changed

sdk/keyvault/test-resources.json

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,18 @@
7272
"description": "Key Vault SKU to deploy. The default is 'premium'"
7373
}
7474
},
75-
"attestationUrl": {
75+
"attestationImage": {
7676
"type": "string",
77-
"defaultValue": "https://skrattestation.azurewebsites.net/",
77+
"defaultValue": "keyvault-mock-attestation:latest",
7878
"metadata": {
79-
"description": "Test attestation service for Secure Key Release"
79+
"description": "The container image name and tag to use for the attestation mock service."
8080
}
8181
}
8282
},
8383
"variables": {
84+
"attestationFarm": "[concat(parameters('baseName'), 'farm')]",
85+
"attestationSite": "[concat(parameters('baseName'), 'site')]",
86+
"attestationUri": "[concat('DOCKER|azsdkengsys.azurecr.io/', parameters('attestationImage'))]",
8487
"kvApiVersion": "2019-09-01",
8588
"kvName": "[parameters('baseName')]",
8689
"hsmApiVersion": "2021-04-01-preview",
@@ -246,6 +249,47 @@
246249
"properties": {
247250
"publicAccess": "None"
248251
}
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+
}
249293
}
250294
],
251295
"outputs": {
@@ -280,7 +324,7 @@
280324
},
281325
"AZURE_KEYVAULT_ATTESTATION_URL": {
282326
"type": "string",
283-
"value": "[parameters('attestationUrl')]"
327+
"value": "[format('https://{0}/', reference(variables('attestationSite')).defaultHostName)]"
284328
}
285329
}
286330
}

0 commit comments

Comments
 (0)