|
114 | 114 | "metadata": { |
115 | 115 | "description": "Provide an optional inline shell command to run on machine launch. For example, to set an environment variable CLOUD=AZURE, use this command excluding the angle brackets: <echo -e \"export CLOUD=AZURE\" | sudo tee -a /etc/profile.d/setenvvar.sh && source /etc/profile>. To run an external script, use this command excluding the angle brackets: <wget -O /tmp/my-script.sh \"https://example.com/script.sh\" && bash /tmp/my-script.sh>. Find the logs at '/var/log/mathworks.log'." |
116 | 116 | } |
| 117 | + }, |
| 118 | + "imageID": { |
| 119 | + "type": "String", |
| 120 | + "defaultValue": "", |
| 121 | + "metadata": { |
| 122 | + "description": "Optional Resource ID of a custom managed image in the target region. To use a prebuilt MathWorks image instead, leave this field empty. If you customize the build, for example by removing or modifying the included scripts, this can make the image incompatible with the provided ARM template. To ensure compatibility, modify the ARM template or image accordingly." |
| 123 | + } |
117 | 124 | } |
118 | 125 | }, |
119 | 126 | "variables": { |
|
134 | 141 | "offer": "matlab-parallel-server-ref-arch-vm-offer", |
135 | 142 | "sku": "matlab-parallel-server-ref-arch-r2023b-vm-sku", |
136 | 143 | "version": "1.0.0", |
137 | | - "imageReference": { |
| 144 | + "imageResourceID": { |
| 145 | + "id": "[parameters('imageID')]" |
| 146 | + }, |
| 147 | + "defaultImageReference": { |
138 | 148 | "publisher": "[variables('publisher')]", |
139 | 149 | "offer": "[variables('offer')]", |
140 | 150 | "sku": "[variables('sku')]", |
141 | 151 | "version": "[variables('version')]" |
142 | 152 | }, |
| 153 | + "imageReference": "[if(empty(parameters('imageId')), variables('defaultImageReference'), variables('imageResourceID'))]", |
143 | 154 | "plan": { |
144 | 155 | "name": "[variables('sku')]", |
145 | 156 | "publisher": "[variables('publisher')]", |
|
369 | 380 | "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" |
370 | 381 | ], |
371 | 382 | "tags": "[variables('tagsForAll')]", |
372 | | - "plan": "[variables('plan')]", |
| 383 | + "plan": "[if(empty(parameters('imageId')), variables('plan') , null())]", |
373 | 384 | "identity": { |
374 | 385 | "type": "SystemAssigned" |
375 | 386 | }, |
|
454 | 465 | "tier": "Standard", |
455 | 466 | "capacity": "[parameters('numWorkerNodes')]" |
456 | 467 | }, |
457 | | - "plan": "[variables('plan')]", |
| 468 | + "plan": "[if(empty(parameters('imageId')), variables('plan') , null())]", |
458 | 469 | "properties": { |
459 | 470 | "overprovision": false, |
460 | 471 | "upgradepolicy": { |
|
0 commit comments