/
frontEndEngineerImgTemplate.json
106 lines (106 loc) · 4.32 KB
/
frontEndEngineerImgTemplate.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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"imgName": {
"defaultValue": "",
"type": "String"
},
"imageGalleryId": {
"defaultValue": "",
"type": "String"
},
"userAssignedId": {
"defaultValue": "",
"type": "String"
},
"location": {
"defaultValue": "",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.VirtualMachineImages/imageTemplates",
"apiVersion": "2022-07-01",
"name": "[parameters('imgName')]",
"location": "[parameters('location')]",
"tags": {
"Environment": "Prod",
"Role": "Front-End-Engineer",
"Team": "Engineering",
"businessUnit": "e-Commerce",
"division": "petv2-Platform",
"offer": "petv2-DevWorkstation-Service",
"solution": "ContosoProjects"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"[parameters('userAssignedId')]": {}
}
},
"properties": {
"source": {
"offer": "windowsplustools",
"publisher": "microsoftvisualstudio",
"sku": "base-win11-gen2",
"type": "PlatformImage",
"version": "latest"
},
"customize": [
{
"type": "WindowsUpdate",
"searchCriteria": "IsInstalled=0",
"filters": [
"exclude:$_.Title -like '*Preview*'"
]
},
{
"type": "PowerShell",
"name": "Installing VS Code",
"inline": [
"Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'));choco install vscode -y;"
]
},
{
"type": "PowerShell",
"name": "Cloning GitHub Repos",
"inline": [
"Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/Evilazaro/MicrosoftDevBox/main/Deploy/ARMTemplates/computeGallery/cloneRepos.ps1'));"
]
}
],
"distribute": [
{
"artifactTags": {
"Environment": "Prod",
"Role": "Front-End-Engineer",
"Team": "Engineering",
"businessUnit": "e-Commerce",
"division": "petv2-Platform",
"offer": "petv2-DevWorkstation-Service",
"solution": "ContosoProjects"
},
"excludeFromLatest": false,
"galleryImageId": "[concat(parameters('imageGalleryId'), concat('/images/', parameters('imgName')))]",
"replicationRegions": [
"[parameters('location')]"
],
"runOutputName": "[parameters('imgName')]",
"type": "SharedImage"
}
],
"buildTimeoutInMinutes": 0,
"vmProfile": {
"vmSize": "Standard_DS2_v2",
"osDiskSizeGB": 128,
"userAssignedIdentities": [
"[parameters('userAssignedId')]"
]
}
}
}
]
}