|
1 | 1 | { |
2 | | - "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", |
| 2 | + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", |
3 | 3 | "contentVersion": "1.0.0.0", |
4 | 4 | "parameters": { |
5 | | - "resourceGroupName": { |
6 | | - "type": "string", |
7 | | - "metadata": { |
8 | | - "description": "Enter the name of resource group to be created for Iot Hub, Storage Account and Web App." |
9 | | - } |
10 | | - }, |
11 | 5 | "deviceArchitecture": { |
12 | 6 | "defaultValue": "X86", |
13 | 7 | "allowedValues": ["X86", "ARM64"], |
|
16 | 10 | "description": "Specify the architecture of the Edge Device. Currently supported values are 'X86' and 'ARM64'." |
17 | 11 | } |
18 | 12 | }, |
19 | | - "containerRegistryName": { |
20 | | - "type": "string", |
21 | | - "defaultValue": "factoryairegistry.azurecr.io", |
22 | | - "metadata": { |
23 | | - "description": "Container Registry Name." |
24 | | - } |
25 | | - }, |
26 | | - "containerRegistryUserName": { |
27 | | - "type": "string", |
28 | | - "defaultValue": "factoryairegistry", |
29 | | - "metadata": { |
30 | | - "description": "Container Registry Username." |
31 | | - } |
32 | | - }, |
33 | | - "containerRegistryPassword": { |
34 | | - "type": "string", |
35 | | - "defaultValue": "", |
36 | | - "metadata": { |
37 | | - "description": "Container Registry Password." |
38 | | - } |
39 | | - }, |
40 | 13 | "moduleRuntime": { |
41 | | - "defaultValue": "CPU", |
42 | | - "allowedValues": ["CPU", "NVIDIA", "MOVIDIUS"], |
| 14 | + "defaultValue": "cpu", |
| 15 | + "allowedValues": ["cpu", "gpu (NVIDIA)", "vpu (Movidius)"], |
43 | 16 | "type": "string", |
44 | 17 | "metadata": { |
45 | 18 | "description": "Select value for runtime for Detector module on Edge Device. Set it to 'CPU' to use CPU to run detector module. If the Edge Device has Nvidia GPU, set it to 'NVIDIA' to use GPU to run detector module or to use movidius set it to 'MOVIDIUS'." |
|
57 | 30 | "defaultValue": "", |
58 | 31 | "type": "string", |
59 | 32 | "metadata": { |
60 | | - "description": "Enter the name of existing Iot Hub. This is required only if 'Use Existing Edge Device' is set to 'Yes'" |
| 33 | + "description": "Enter the name of existing Iot Hub." |
61 | 34 | } |
62 | 35 | }, |
63 | 36 | "edgeDeviceName": { |
64 | 37 | "defaultValue": "", |
65 | 38 | "type": "string", |
66 | 39 | "metadata": { |
67 | | - "description": "Enter the name of existing Iot Hub. This is required only if 'Use Existing Edge Device' is set to 'Yes'" |
| 40 | + "description": "Enter the name of existing Iot Hub Edge Device." |
68 | 41 | } |
69 | 42 | }, |
70 | 43 | "customVisionName": { |
71 | 44 | "type": "string", |
72 | | - "defaultValue": "mycustomvision" |
| 45 | + "metadata": { |
| 46 | + "description": "Enter the name of existing Custom Vision." |
| 47 | + } |
73 | 48 | }, |
74 | 49 | "mediaServiceName": { |
75 | 50 | "type": "string", |
76 | | - "defaultValue": "myams" |
| 51 | + "metadata": { |
| 52 | + "description": "Enter the name of existing Azure Media Service." |
| 53 | + } |
77 | 54 | }, |
78 | 55 | "mediaServiceServicePrincipalName": { |
79 | 56 | "type": "string", |
80 | | - "defaultValue": "myamsspname", |
81 | 57 | "metadata": { |
82 | | - "description": "Azure Media Service Principal name" |
| 58 | + "description": "Enter the name of existing Azure Media Service Principal name." |
83 | 59 | } |
84 | 60 | }, |
85 | 61 | "mediaServiceServicePrincipalSecret": { |
86 | | - "type": "string", |
87 | | - "defaultValue": "myamsspsecret", |
| 62 | + "type": "securestring", |
88 | 63 | "metadata": { |
89 | | - "defaultValue": "Azure Media Service Principal secret" |
| 64 | + "defaultValue": "Azure Media Service Principal secret." |
90 | 65 | } |
91 | 66 | } |
92 | 67 | }, |
93 | 68 | "variables": { |
94 | | - "location": "[deployment().location]", |
95 | | - "resourceGroupName": "[parameters('resourceGroupName')]", |
96 | | - "deploymentName": "[concat('factoryai-deployment',substring(uniqueString(subscription().id,parameters('resourceGroupName')),1,4))]", |
97 | | - "managedIdentityName": "[concat('Managed_Identity',substring(uniqueString(subscription().id,parameters('resourceGroupName')),1,4))]", |
98 | | - "managedIdentityResourceGroup": "[parameters('resourceGroupName')]" |
| 69 | + "resourceGroupName": "[resourceGroup().name]", |
| 70 | + "deploymentName": "[concat('factoryai-deployment',substring(uniqueString(subscription().id,variables('resourceGroupName')),1,4))]", |
| 71 | + "managedIdentityName": "[concat('Managed_Identity',substring(uniqueString(subscription().id,variables('resourceGroupName')),1,4))]", |
| 72 | + "managedIdentityResourceGroup": "[variables('resourceGroupName')]", |
| 73 | + "containerRegistryName": "docker.io", |
| 74 | + "containerRegistryUserName": "", |
| 75 | + "containerRegistryPassword": "" |
99 | 76 | }, |
100 | 77 | "resources": [ |
101 | | - { |
102 | | - "type": "Microsoft.Resources/resourceGroups", |
103 | | - "apiVersion": "2020-06-01", |
104 | | - "name": "[variables('resourceGroupName')]", |
105 | | - "location": "[variables('location')]", |
106 | | - "properties": {} |
107 | | - }, |
108 | 78 | { |
109 | 79 | "type": "Microsoft.Resources/deployments", |
110 | 80 | "apiVersion": "2020-06-01", |
111 | 81 | "name": "CreatingManagedIdentity", |
112 | | - "dependsOn": [ |
113 | | - "[resourceId('Microsoft.Resources/resourceGroups/', parameters('resourceGroupName'))]" |
114 | | - ], |
115 | 82 | "properties": { |
116 | 83 | "mode": "Incremental", |
117 | 84 | "template": { |
|
124 | 91 | "type": "Microsoft.ManagedIdentity/userAssignedIdentities", |
125 | 92 | "name": "[variables('managedIdentityName')]", |
126 | 93 | "apiVersion": "2018-11-30", |
127 | | - "location": "[variables('location')]" |
| 94 | + "location": "[resourceGroup().location]" |
128 | 95 | } |
129 | 96 | ] |
130 | 97 | } |
131 | 98 | }, |
132 | | - "resourceGroup": "[parameters('resourceGroupName')]" |
| 99 | + "resourceGroup": "[variables('resourceGroupName')]" |
133 | 100 | }, |
134 | 101 | { |
135 | 102 | "type": "Microsoft.Resources/deployments", |
|
170 | 137 | ] |
171 | 138 | } |
172 | 139 | }, |
173 | | - "resourceGroup": "[parameters('resourceGroupName')]" |
| 140 | + "resourceGroup": "[variables('resourceGroupName')]" |
174 | 141 | }, |
175 | 142 | { |
176 | 143 | "type": "Microsoft.Resources/deployments", |
177 | 144 | "apiVersion": "2020-06-01", |
178 | 145 | "name": "ResourcesDeployment", |
179 | | - "dependsOn": [ |
180 | | - "[resourceId('Microsoft.Resources/resourceGroups/', parameters('resourceGroupName'))]", |
181 | | - "CreatingRoleAssignments", |
182 | | - "CreatingManagedIdentity" |
183 | | - ], |
| 146 | + "dependsOn": ["CreatingRoleAssignments", "CreatingManagedIdentity"], |
184 | 147 | "properties": { |
185 | 148 | "mode": "Incremental", |
186 | 149 | "expressionEvaluationOptions": { |
187 | 150 | "scope": "inner" |
188 | 151 | }, |
189 | 152 | "parameters": { |
190 | 153 | "resourceGroupName": { |
191 | | - "value": "[parameters('resourceGroupName')]" |
| 154 | + "value": "[variables('resourceGroupName')]" |
192 | 155 | }, |
193 | 156 | "videoCaptureModule": { |
194 | 157 | "value": "[parameters('videoCaptureModule')]" |
|
206 | 169 | "value": "[parameters('iotHubName')]" |
207 | 170 | }, |
208 | 171 | "resourceGroupLocation": { |
209 | | - "value": "[variables('location')]" |
| 172 | + "value": "[resourceGroup().location]" |
210 | 173 | }, |
211 | 174 | "deviceArchitecture": { |
212 | 175 | "value": "[parameters('deviceArchitecture')]" |
|
215 | 178 | "value": "[parameters('moduleRuntime')]" |
216 | 179 | }, |
217 | 180 | "containerRegistryName": { |
218 | | - "value": "[parameters('containerRegistryName')]" |
| 181 | + "value": "[variables('containerRegistryName')]" |
219 | 182 | }, |
220 | 183 | "containerRegistryUserName": { |
221 | | - "value": "[parameters('containerRegistryUserName')]" |
| 184 | + "value": "[variables('containerRegistryUserName')]" |
222 | 185 | }, |
223 | 186 | "containerRegistryPassword": { |
224 | | - "value": "[parameters('containerRegistryPassword')]" |
| 187 | + "value": "[variables('containerRegistryPassword')]" |
225 | 188 | }, |
226 | 189 | "managedIdentityResourceGroup": { |
227 | 190 | "value": "[variables('managedIdentityResourceGroup')]" |
|
389 | 352 | ] |
390 | 353 | } |
391 | 354 | }, |
392 | | - "resourceGroup": "[parameters('resourceGroupName')]" |
| 355 | + "resourceGroup": "[variables('resourceGroupName')]" |
393 | 356 | } |
394 | 357 | ] |
395 | 358 | } |
0 commit comments