|
79 | 79 | "list": "value|[*].{label:name, value:id}" |
80 | 80 | } |
81 | 81 | } |
82 | | - } |
| 82 | + } |
83 | 83 | ] |
84 | 84 | }, |
85 | 85 | { |
|
100 | 100 | "type": "Microsoft.Common.Section", |
101 | 101 | "label": "Virtual Machine Naming", |
102 | 102 | "elements": [ |
| 103 | + { |
| 104 | + "name": "prefix", |
| 105 | + "type": "Microsoft.Common.TextBox", |
| 106 | + "visible": "[not(steps('sessionHosts').naming.customNaming)]", |
| 107 | + "label": "Deployment Prefix", |
| 108 | + "subLabel": "", |
| 109 | + "defaultValue": "AVD1", |
| 110 | + "toolTip": "The name of the resource group to deploy. (Default: AVD1)", |
| 111 | + "constraints": { |
| 112 | + "required": true, |
| 113 | + "regex": "^[a-zA-Z0-9]{2,4}$", |
| 114 | + "validationMessage": "The prefix can be 2-4 aphanumeric characters." |
| 115 | + } |
| 116 | + }, |
| 117 | + { |
| 118 | + "name": "environment", |
| 119 | + "type": "Microsoft.Common.DropDown", |
| 120 | + "label": "Deployment Environment", |
| 121 | + "visible": "[not(steps('sessionHosts').naming.customNaming)]", |
| 122 | + "defaultValue": "Dev", |
| 123 | + "toolTip": "The name of the resource group to deploy.", |
| 124 | + "constraints": { |
| 125 | + "required": true, |
| 126 | + "allowedValues": [ |
| 127 | + { |
| 128 | + "label": "Dev", |
| 129 | + "value": "Dev" |
| 130 | + }, |
| 131 | + { |
| 132 | + "label": "Test", |
| 133 | + "value": "Test" |
| 134 | + }, |
| 135 | + { |
| 136 | + "label": "Prod", |
| 137 | + "value": "Prod" |
| 138 | + } |
| 139 | + ] |
| 140 | + } |
| 141 | + }, |
103 | 142 | { |
104 | 143 | "name": "customNaming", |
105 | 144 | "type": "Microsoft.Common.CheckBox", |
|
982 | 1021 | "hostPoolResourceId": "[steps('basics').hostPool.id]", |
983 | 1022 | "location": "[steps('basics').resourceScope.location.name]", |
984 | 1023 | "computeRgResourceGroupName": "[steps('basics').resourceGroup.name]", |
985 | | - "deploymentPrefix": "[first(skip(split(steps('basics').resourceGroup.name, '-'), 2))]", |
986 | | - "deploymentEnvironment": "[first(skip(split(steps('basics').resourceGroup.name, '-'), 3))]", |
| 1024 | + "deploymentPrefix": "[if(not(steps('sessionHosts').naming.customNaming), steps('sessionHosts').naming.prefix, '')]", |
| 1025 | + "deploymentEnvironment": "[if(not(steps('sessionHosts').naming.customNaming), steps('sessionHosts').naming.environment, '')]", |
987 | 1026 | "customNaming": "[steps('sessionHosts').naming.customNaming]", |
988 | 1027 | "sessionHostCustomNamePrefix": "[if(steps('sessionHosts').naming.customNaming, steps('sessionHosts').naming.vmNamePrefix, 'notapp')]", |
989 | 1028 | "count": "[steps('sessionHosts').naming.count]", |
|
0 commit comments