|
79 | 79 | "list": "value|[*].{label:name, value:id}" |
80 | 80 | } |
81 | 81 | } |
| 82 | + } |
| 83 | + ] |
| 84 | + }, |
| 85 | + { |
| 86 | + "name": "sessionHosts", |
| 87 | + "label": "Session Hosts", |
| 88 | + "elements": [ |
| 89 | + { |
| 90 | + "name": "resourceSkusApi", |
| 91 | + "type": "Microsoft.Solutions.ArmApiControl", |
| 92 | + "condition": "[and(not(empty(steps('basics').resourceScope.subscription)), not(empty(steps('basics').resourceScope.location)))]", |
| 93 | + "request": { |
| 94 | + "method": "GET", |
| 95 | + "path": "[concat(steps('basics').resourceScope.subscription.id, '/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter=location eq ', decodeUriComponent('%27'), steps('basics').resourceScope.location.name, decodeUriComponent('%27'))]" |
| 96 | + } |
82 | 97 | }, |
83 | 98 | { |
84 | | - "name": "deployment", |
| 99 | + "name": "naming", |
85 | 100 | "type": "Microsoft.Common.Section", |
86 | | - "label": "Deployment Details", |
| 101 | + "label": "Virtual Machine Naming", |
87 | 102 | "elements": [ |
88 | 103 | { |
89 | 104 | "name": "prefix", |
90 | 105 | "type": "Microsoft.Common.TextBox", |
| 106 | + "visible": "[not(steps('sessionHosts').naming.customNaming)]", |
91 | 107 | "label": "Deployment Prefix", |
92 | 108 | "subLabel": "", |
93 | 109 | "defaultValue": "AVD1", |
|
102 | 118 | "name": "environment", |
103 | 119 | "type": "Microsoft.Common.DropDown", |
104 | 120 | "label": "Deployment Environment", |
| 121 | + "visible": "[not(steps('sessionHosts').naming.customNaming)]", |
105 | 122 | "defaultValue": "Dev", |
106 | 123 | "toolTip": "The name of the resource group to deploy.", |
107 | 124 | "constraints": { |
|
121 | 138 | } |
122 | 139 | ] |
123 | 140 | } |
124 | | - } |
125 | | - ], |
126 | | - "visible": true |
127 | | - } |
128 | | - ] |
129 | | - }, |
130 | | - { |
131 | | - "name": "sessionHosts", |
132 | | - "label": "Session Hosts", |
133 | | - "elements": [ |
134 | | - { |
135 | | - "name": "resourceSkusApi", |
136 | | - "type": "Microsoft.Solutions.ArmApiControl", |
137 | | - "condition": "[and(not(empty(steps('basics').resourceScope.subscription)), not(empty(steps('basics').resourceScope.location)))]", |
138 | | - "request": { |
139 | | - "method": "GET", |
140 | | - "path": "[concat(steps('basics').resourceScope.subscription.id, '/providers/Microsoft.Compute/skus?api-version=2021-07-01&$filter=location eq ', decodeUriComponent('%27'), steps('basics').resourceScope.location.name, decodeUriComponent('%27'))]" |
141 | | - } |
142 | | - }, |
143 | | - { |
144 | | - "name": "naming", |
145 | | - "type": "Microsoft.Common.Section", |
146 | | - "label": "Virtual Machine Naming", |
147 | | - "elements": [ |
| 141 | + }, |
148 | 142 | { |
149 | 143 | "name": "customNaming", |
150 | 144 | "type": "Microsoft.Common.CheckBox", |
|
1027 | 1021 | "hostPoolResourceId": "[steps('basics').hostPool.id]", |
1028 | 1022 | "location": "[steps('basics').resourceScope.location.name]", |
1029 | 1023 | "computeRgResourceGroupName": "[steps('basics').resourceGroup.name]", |
1030 | | - "deploymentPrefix": "[steps('basics').deployment.prefix]", |
1031 | | - "deploymentEnvironment": "[steps('basics').deployment.environment]", |
| 1024 | + "deploymentPrefix": "[if(not(steps('sessionHosts').naming.customNaming), steps('sessionHosts').naming.prefix, '')]", |
| 1025 | + "deploymentEnvironment": "[if(not(steps('sessionHosts').naming.customNaming), steps('sessionHosts').naming.environment, '')]", |
1032 | 1026 | "customNaming": "[steps('sessionHosts').naming.customNaming]", |
1033 | 1027 | "sessionHostCustomNamePrefix": "[if(steps('sessionHosts').naming.customNaming, steps('sessionHosts').naming.vmNamePrefix, 'notapp')]", |
1034 | 1028 | "count": "[steps('sessionHosts').naming.count]", |
|
0 commit comments