-
Notifications
You must be signed in to change notification settings - Fork 4
/
sample.json
160 lines (160 loc) · 4.95 KB
/
sample.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
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"newVMName": {
"type": "string",
"defaultValue": "testvm1"
},
"labName": {
"type": "string",
"defaultValue": "nigurrdemo"
},
"size": {
"type": "string",
"defaultValue": "Standard_D2s_v3"
},
"userName": {
"type": "string",
"defaultValue": "testuser"
},
"password": {
"type": "securestring"
},
"VSTS_Build_Agent_vstsAccount": {
"type": "string",
"defaultValue": "mseng"
},
"VSTS_Build_Agent_vstsPassword": {
"type": "securestring"
},
"VSTS_Build_Agent_agentName": {
"type": "string",
"defaultValue": "testvm1"
},
"VSTS_Build_Agent_agentNameSuffix": {
"type": "string",
"defaultValue": "testagent"
},
"VSTS_Build_Agent_poolName": {
"type": "string",
"defaultValue": "Nitin"
},
"VSTS_Build_Agent_RunAsAutoLogon": {
"type": "bool",
"defaultValue": true
},
"VSTS_Build_Agent_windowsLogonAccount": {
"type": "string",
"defaultValue": ".\\testuser"
},
"VSTS_Build_Agent_windowsLogonPassword": {
"type": "securestring"
},
"VSTS_Build_Agent_driveLetter": {
"type": "string",
"defaultValue": "C"
},
"VSTS_Build_Agent_workDirectory": {
"type": "string",
"defaultValue": ""
}
},
"variables": {
"labSubnetName": "[concat(variables('labVirtualNetworkName'), 'Subnet')]",
"labVirtualNetworkId": "[resourceId('Microsoft.DevTestLab/labs/virtualnetworks', parameters('labName'), variables('labVirtualNetworkName'))]",
"labVirtualNetworkName": "[concat('Dtl', parameters('labName'))]",
"vmId": "[resourceId ('Microsoft.DevTestLab/labs/virtualmachines', parameters('labName'), parameters('newVMName'))]",
"vmName": "[concat(parameters('labName'), '/', parameters('newVMName'))]"
},
"resources": [
{
"apiVersion": "2017-04-26-preview",
"type": "Microsoft.DevTestLab/labs/virtualmachines",
"name": "[variables('vmName')]",
"location": "[resourceGroup().location]",
"properties": {
"labVirtualNetworkId": "[variables('labVirtualNetworkId')]",
"notes": "Windows Server 2016 Datacenter",
"galleryImageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter",
"osType": "Windows",
"version": "latest"
},
"size": "[parameters('size')]",
"userName": "[parameters('userName')]",
"password": "[parameters('password')]",
"isAuthenticationWithSshKey": false,
"artifacts": [
{
"artifactId": "[resourceId('Microsoft.DevTestLab/labs/artifactSources/artifacts', parameters('labName'), 'public repo', 'windows-vsts-build-agent')]",
"parameters": [
{
"name": "vstsAccount",
"value": "[parameters('VSTS_Build_Agent_vstsAccount')]"
},
{
"name": "vstsPassword",
"value": "[parameters('VSTS_Build_Agent_vstsPassword')]"
},
{
"name": "agentName",
"value": "[parameters('VSTS_Build_Agent_agentName')]"
},
{
"name": "agentNameSuffix",
"value": "[parameters('VSTS_Build_Agent_agentNameSuffix')]"
},
{
"name": "poolName",
"value": "[parameters('VSTS_Build_Agent_poolName')]"
},
{
"name": "RunAsAutoLogon",
"value": "[parameters('VSTS_Build_Agent_RunAsAutoLogon')]"
},
{
"name": "windowsLogonAccount",
"value": "[parameters('VSTS_Build_Agent_windowsLogonAccount')]"
},
{
"name": "windowsLogonPassword",
"value": "[parameters('VSTS_Build_Agent_windowsLogonPassword')]"
},
{
"name": "driveLetter",
"value": "[parameters('VSTS_Build_Agent_driveLetter')]"
},
{
"name": "workDirectory",
"value": "[parameters('VSTS_Build_Agent_workDirectory')]"
}
]
}
],
"labSubnetName": "[variables('labSubnetName')]",
"disallowPublicIpAddress": true,
"storageType": "Premium",
"allowClaim": false,
"networkInterface": {
"sharedPublicIpAddressConfiguration": {
"inboundNatRules": [
{
"transportProtocol": "tcp",
"backendPort": 3389
}
]
}
}
}
}
],
"outputs": {
"labVMId": {
"type": "string",
"value": "[variables('vmId')]"
}
}
}