a b/infrastructure/deployment.json
1
{
2
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3
  "contentVersion": "1.0.0.0",
4
  "parameters": {
5
    "location": {
6
      "type": "string",
7
      "defaultValue": "eastus",
8
      "allowedValues": [
9
        "eastus",
10
        "eastus2",
11
        "southcentralus",
12
        "southeastasia",
13
        "westcentralus",
14
        "westeurope",
15
        "westus2"
16
      ],
17
      "metadata": {
18
        "description": "Specifies the location for all resources."
19
      }
20
    }
21
  },
22
  "variables": {
23
    "amlWorkspaceName": "[concat(uniqueString(resourceGroup().id),'-aml')]",
24
    "storageAccountName": "[concat(uniqueString(resourceGroup().id), 'st')]",
25
    "storageAccountType": "Standard_LRS",
26
    "amlWorkspaceType":"enterprise",
27
    "keyVaultName": "[concat(uniqueString(resourceGroup().id), '-kv')]",
28
    "tenantId": "[subscription().tenantId]",
29
    "applicationInsightsName": "[concat(uniqueString(resourceGroup().id),'-ai')]",
30
    "containerRegistryName": "[concat(uniqueString(resourceGroup().id),'acr')]"
31
  },
32
  "resources": [
33
    {
34
      "type": "Microsoft.Storage/storageAccounts",
35
      "apiVersion": "2018-07-01",
36
      "name": "[variables('storageAccountName')]",
37
      "location": "[parameters('location')]",
38
      "sku": {
39
        "name": "[variables('storageAccountType')]"
40
      },
41
      "kind": "StorageV2",
42
      "properties": {
43
        "encryption": {
44
          "services": {
45
            "blob": {
46
              "enabled": true
47
            },
48
            "file": {
49
              "enabled": true
50
            }
51
          },
52
          "keySource": "Microsoft.Storage"
53
        },
54
        "supportsHttpsTrafficOnly": true
55
      }
56
    },
57
    {
58
      "type": "Microsoft.KeyVault/vaults",
59
      "apiVersion": "2018-02-14",
60
      "name": "[variables('keyVaultName')]",
61
      "location": "[parameters('location')]",
62
      "properties": {
63
        "tenantId": "[variables('tenantId')]",
64
        "sku": {
65
          "name": "standard",
66
          "family": "A"
67
        },
68
        "accessPolicies": []
69
      }
70
    },
71
    {
72
      "type": "Microsoft.Insights/components",
73
      "apiVersion": "2015-05-01",
74
      "name": "[variables('applicationInsightsName')]",
75
      "location": "[if(or(equals(parameters('location'),'eastus2'),equals(parameters('location'),'westcentralus')),'southcentralus',parameters('location'))]",
76
      "kind": "web",
77
      "properties": {
78
        "Application_Type": "web"
79
      }
80
    },
81
    {
82
      "type": "Microsoft.ContainerRegistry/registries",
83
      "apiVersion": "2017-10-01",
84
      "name": "[variables('containerRegistryName')]",
85
      "location": "[parameters('location')]",
86
      "sku": {
87
        "name": "Standard"
88
      },
89
      "properties": {
90
        "adminUserEnabled": true
91
      }
92
    },
93
    {
94
      "type": "Microsoft.MachineLearningServices/workspaces",
95
      "apiVersion": "2018-11-19",
96
      "name": "[variables('amlWorkspaceName')]",
97
      "location": "[parameters('location')]",
98
      "dependsOn": [
99
        "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
100
        "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]",
101
        "[resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]",
102
        "[resourceId('Microsoft.ContainerRegistry/registries', variables('containerRegistryName'))]"
103
      ],
104
      "identity": {
105
        "type": "systemAssigned"
106
      },
107
      "sku": {
108
        "tier": "[variables('amlWorkspaceType')]",
109
        "name": "[variables('amlWorkspaceType')]"
110
      },
111
      "properties": {
112
        "friendlyName": "[variables('amlWorkspaceName')]",
113
        "keyVault": "[resourceId('Microsoft.KeyVault/vaults',variables('keyVaultName'))]",
114
        "applicationInsights": "[resourceId('Microsoft.Insights/components',variables('applicationInsightsName'))]",
115
        "containerRegistry": "[resourceId('Microsoft.ContainerRegistry/registries',variables('containerRegistryName'))]",
116
        "storageAccount": "[resourceId('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]"
117
      }
118
    }
119
  ]
120
}