-
Notifications
You must be signed in to change notification settings - Fork 16k
/
createUiDefinition.json
181 lines (176 loc) · 8.5 KB
/
createUiDefinition.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#",
"handler": "Microsoft.Azure.CreateUIDef",
"version": "0.1.2-preview",
"parameters": {
"basics": [
{
"name": "vmName",
"type": "Microsoft.Common.TextBox",
"label": "Virtual Machine name",
"toolTip": "The name of the Virtual Machine.",
"defaultValue": "linux-vm",
"constraints": {
"required": true,
"regex": "^[a-z0-9A-Z-]{3,79}$",
"validationMessage": "The VM Name must be between 3 and 79 characters long and contain letters, numbers and hyphens only."
}
},
{
"name": "adminUsername",
"type": "Microsoft.Compute.UserNameTextBox",
"label": "Username",
"toolTip": "Admin username for the machine",
"osPlatform": "Linux",
"constraints": {
"required": true
}
},
{
"name": "SSHCredentials",
"type": "Microsoft.Compute.CredentialsCombo",
"label": {
"authenticationType": "Authentication type",
"password": "Password",
"confirmPassword": "Confirm password",
"sshPublicKey": "SSH public key"
},
"toolTip": {
"authenticationType": "Authentication Type for the Virtual Machine",
"password": "Password for the Virtual Machine",
"sshPublicKey": "SSH Public Key for the Virtual Machine"
},
"constraints": {
"required": true
},
"options": {
"hideConfirmation": false
},
"osPlatform": "Linux"
}
],
"steps": [
{
"name": "VirtualMachineConfig",
"label": "Virtual Machine Settings",
"subLabel": {
"preValidation": "Configure the virtual machine's resources and settings",
"postValidation": "Done"
},
"bladeTitle": "Virtual Machine Settings",
"elements": [
{
"name": "vmSize",
"type": "Microsoft.Compute.SizeSelector",
"label": "Virtual machine size",
"toolTip": "The size of virtual machine to provision.",
"recommendedSizes": [
"Standard_D2_v2",
"Standard_A2_v2"
],
"osPlatform": "Linux",
"count": "1"
},
{
"name": "storageAccount",
"type": "Microsoft.Storage.StorageAccountSelector",
"label": "Diagnostic storage account",
"toolTip": "Storage Account for the Virtual Machine's diagnostics",
"defaultValue": {
"type": "Standard_LRS",
"name": "[concat(replace(basics('vmName'), '-', ''), take(replace(guid(), '-', ''), 10))]"
},
"constraints": {
"allowedTypes": [
"Standard_LRS",
"Standard_GRS"
]
}
},
{
"name": "publicIpAddress",
"type": "Microsoft.Network.PublicIpAddressCombo",
"label": {
"publicIpAddress": "Public IP Address for the VM",
"domainNameLabel": "DNS Prefix for the public IP Address"
},
"toolTip": {
"publicIpAddress": "Public IP Address for the VM",
"domainNameLabel": "DNS Prefix for the public IP Address, must be globally unique"
},
"defaultValue": {
"publicIpAddressName": "[concat(basics('vmName'), '-ip')]",
"domainNameLabel": "[concat(basics('vmName'), '-', take(replace(guid(), '-', ''), 10))]"
},
"options": {
"hideExisting": false,
"hideNone": false
},
"constraints": {
"required": {
"domainNameLabel": true
}
}
},
{
"name": "virtualNetwork",
"type": "Microsoft.Network.VirtualNetworkCombo",
"label": {
"virtualNetwork": "Virtual network",
"subnets": "Subnets"
},
"toolTip": {
"virtualNetwork": "Name of the virtual network",
"subnets": "Subnets for the virtual network"
},
"defaultValue": {
"name": "VirtualNetwork",
"addressPrefixSize": "/16"
},
"constraints": {
"minAddressPrefixSize": "/16"
},
"subnets": {
"subnet1": {
"label": "Subnet",
"defaultValue": {
"name": "Subnet-1",
"addressPrefixSize": "/24"
},
"constraints": {
"minAddressPrefixSize": "/24",
"minAddressCount": 12,
"requireContiguousAddresses": false
}
}
}
}
]
}
],
"outputs": {
"location": "[location()]",
"vmName": "[basics('vmName')]",
"adminUsername": "[basics('adminUsername')]",
"authenticationType": "[basics('SSHCredentials').authenticationType]",
"adminPasswordOrKey": "[coalesce(basics('SSHCredentials').password, basics('SSHCredentials').sshPublicKey)]",
"vmSize": "[steps('VirtualMachineConfig').vmSize]",
"storageNewOrExisting": "[steps('VirtualMachineConfig').storageAccount.newOrExisting]",
"storageAccountName": "[steps('VirtualMachineConfig').storageAccount.name]",
"storageAccountType": "[steps('VirtualMachineConfig').storageAccount.type]",
"storageAccountResourceGroupName": "[steps('VirtualMachineConfig').storageAccount.resourceGroup]",
"virtualNetworkNewOrExisting": "[steps('VirtualMachineConfig').virtualNetwork.newOrExisting]",
"virtualNetworkName": "[steps('VirtualMachineConfig').virtualNetwork.name]",
"addressPrefixes": "[steps('VirtualMachineConfig').virtualNetwork.addressPrefixes]",
"subnetName": "[steps('VirtualMachineConfig').virtualNetwork.subnets.subnet1.name]",
"subnetPrefix": "[steps('VirtualMachineConfig').virtualNetwork.subnets.subnet1.addressPrefix]",
"virtualNetworkResourceGroupName": "[steps('VirtualMachineConfig').virtualNetwork.resourceGroup]",
"publicIpNewOrExisting": "[steps('VirtualMachineConfig').publicIpAddress.newOrExistingOrNone]",
"publicIpName": "[steps('VirtualMachineConfig').publicIpAddress.name]",
"publicIpDns": "[steps('VirtualMachineConfig').publicIpAddress.domainNameLabel]",
"publicIpResourceGroupName": "[steps('VirtualMachineConfig').publicIpAddress.resourceGroup]",
"publicIPAllocationMethod": "[steps('VirtualMachineConfig').publicIpAddress.publicIPAllocationMethod]",
"publicIpSku": "[steps('VirtualMachineConfig').publicIpAddress.sku]"
}
}
}