|
1 | 1 | { |
2 | 2 | "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", |
3 | | - "handler": "Microsoft.Compute.MultiVm", |
| 3 | + "handler": "Microsoft.Azure.CreateUIDef", |
4 | 4 | "version": "0.1.2-preview", |
5 | 5 | "parameters": { |
6 | 6 | "basics": [ |
| 7 | + { |
| 8 | + "name": "zoneInfo", |
| 9 | + "type": "Microsoft.Solutions.ArmApiControl", |
| 10 | + "request": { |
| 11 | + "method": "GET", |
| 12 | + "path": "[concat('/subscriptions/', subscription().subscriptionId, '/locations/?api-version=2022-12-01')]" |
| 13 | + } |
| 14 | + }, |
| 15 | + { |
| 16 | + "name": "availabilityZonesChoice", |
| 17 | + "type": "Microsoft.Common.OptionsGroup", |
| 18 | + "label": "Use availability zones", |
| 19 | + "defaultValue": "No", |
| 20 | + "toolTip": "Deploy the MDS VM in an availability zone for high availability and fault tolerance.", |
| 21 | + "constraints": { |
| 22 | + "allowedValues": [ |
| 23 | + { "label": "No", "value": "No" }, |
| 24 | + { "label": "Yes", "value": "Yes" } |
| 25 | + ] |
| 26 | + }, |
| 27 | + "visible": "[and(not(empty(basics('zoneInfo').value)), greater(int(if(greater(length(filter(basics('zoneInfo').value, (r) => equals(r.name, location()))), 0), if(greater(length(first(filter(basics('zoneInfo').value, (r) => equals(r.name, location()))).availabilityZoneMappings), 0), string(length(first(filter(basics('zoneInfo').value, (r) => equals(r.name, location()))).availabilityZoneMappings)), '0'), '0')), 0))]" |
| 28 | + }, |
| 29 | + { |
| 30 | + "name": "zoneDropdown", |
| 31 | + "type": "Microsoft.Common.DropDown", |
| 32 | + "label": "Availability zone", |
| 33 | + "toolTip": "Select the availability zone for the MDS VM.", |
| 34 | + "filter": true, |
| 35 | + "defaultValue": "Zone 1", |
| 36 | + "constraints": { |
| 37 | + "allowedValues": "[map(range(1, int(string(length(first(filter(basics('zoneInfo').value, (r) => equals(r.name, location()))).availabilityZoneMappings)))), (item) => parse(concat('{\"label\":\"Zone ', string(item), '\",\"value\":\"', string(item), '\"}')))]", |
| 38 | + "required": false |
| 39 | + }, |
| 40 | + "visible": "[and(equals(basics('availabilityZonesChoice'), 'Yes'), not(equals(steps('chkp-advanced').adminShell, '__dependency__')))]" |
| 41 | + }, |
7 | 42 | { |
8 | 43 | "name": "CloudGuard MDS deployment guide", |
9 | 44 | "type": "Microsoft.Common.TextBlock", |
|
802 | 837 | "additionalDiskSizeGB": "[int(steps('chkp-advanced').additionalDiskSizeGB)]", |
803 | 838 | "diskType": "[if(contains('R81.10' , steps('chkp').cloudGuardVersion) , steps('chkp-advanced').VMDiskTypeOldVersions , steps('chkp-advanced').VMDiskType)]", |
804 | 839 | "sourceImageVhdUri": "[coalesce(steps('chkp-advanced').sourceImageVhdUri, 'noCustomUri')]", |
| 840 | + "availabilityZones": "[if(equals(basics('availabilityZonesChoice'), 'Yes'), parse(concat('[\"', coalesce(basics('zoneDropdown'), '1'), '\"]')), parse('[]'))]", |
| 841 | + "availabilityZonesChoice": "[basics('availabilityZonesChoice')]", |
805 | 842 | "adminShell": "[steps('chkp-advanced').adminShell]", |
806 | 843 | "tagsByResource": "[steps('tags').tagsByResource]", |
807 | 844 | "deployNewNSG": "[steps('network').NSG]", |
|
0 commit comments