--- a +++ b/infrastructure/deployment.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "string", + "defaultValue": "eastus", + "allowedValues": [ + "eastus", + "eastus2", + "southcentralus", + "southeastasia", + "westcentralus", + "westeurope", + "westus2" + ], + "metadata": { + "description": "Specifies the location for all resources." + } + } + }, + "variables": { + "amlWorkspaceName": "[concat(uniqueString(resourceGroup().id),'-aml')]", + "storageAccountName": "[concat(uniqueString(resourceGroup().id), 'st')]", + "storageAccountType": "Standard_LRS", + "amlWorkspaceType":"enterprise", + "keyVaultName": "[concat(uniqueString(resourceGroup().id), '-kv')]", + "tenantId": "[subscription().tenantId]", + "applicationInsightsName": "[concat(uniqueString(resourceGroup().id),'-ai')]", + "containerRegistryName": "[concat(uniqueString(resourceGroup().id),'acr')]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "StorageV2", + "properties": { + "encryption": { + "services": { + "blob": { + "enabled": true + }, + "file": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "supportsHttpsTrafficOnly": true + } + }, + { + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "2018-02-14", + "name": "[variables('keyVaultName')]", + "location": "[parameters('location')]", + "properties": { + "tenantId": "[variables('tenantId')]", + "sku": { + "name": "standard", + "family": "A" + }, + "accessPolicies": [] + } + }, + { + "type": "Microsoft.Insights/components", + "apiVersion": "2015-05-01", + "name": "[variables('applicationInsightsName')]", + "location": "[if(or(equals(parameters('location'),'eastus2'),equals(parameters('location'),'westcentralus')),'southcentralus',parameters('location'))]", + "kind": "web", + "properties": { + "Application_Type": "web" + } + }, + { + "type": "Microsoft.ContainerRegistry/registries", + "apiVersion": "2017-10-01", + "name": "[variables('containerRegistryName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "adminUserEnabled": true + } + }, + { + "type": "Microsoft.MachineLearningServices/workspaces", + "apiVersion": "2018-11-19", + "name": "[variables('amlWorkspaceName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]", + "[resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]", + "[resourceId('Microsoft.ContainerRegistry/registries', variables('containerRegistryName'))]" + ], + "identity": { + "type": "systemAssigned" + }, + "sku": { + "tier": "[variables('amlWorkspaceType')]", + "name": "[variables('amlWorkspaceType')]" + }, + "properties": { + "friendlyName": "[variables('amlWorkspaceName')]", + "keyVault": "[resourceId('Microsoft.KeyVault/vaults',variables('keyVaultName'))]", + "applicationInsights": "[resourceId('Microsoft.Insights/components',variables('applicationInsightsName'))]", + "containerRegistry": "[resourceId('Microsoft.ContainerRegistry/registries',variables('containerRegistryName'))]", + "storageAccount": "[resourceId('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]" + } + } + ] +} \ No newline at end of file