-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate_azure_vm.yaml
More file actions
81 lines (79 loc) · 2.13 KB
/
template_azure_vm.yaml
File metadata and controls
81 lines (79 loc) · 2.13 KB
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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: azure-vm-template
title: Azure VM Template
description: Template to create an Azure VM for 2 days
spec:
owner: team-a
type: service
parameters:
- title: VM Configuration
properties:
vmName:
title: VM Name
type: string
resourceGroupName:
title: Resource Group Name
type: string
location:
title: Location
type: string
enum:
- eastus
- westus
- westeurope
- southeastasia
adminUserName:
title: Admin Username
type: string
ui:field: Secret
adminPassword:
title: Admin Password
type: string
ui:widget: password
minLength: 12
osVersion:
title: OSVersion
type: string
enum:
- win10-22h2-pro
- win10-22h2-pro-g2
- 2022-datacenter-azure-edition
- 2022-datacenter-core-g2
vmSize:
title: Virtual Machine Size
type: string
enum:
- Standard_B1s
- Standard_D2s_v5
bearerToken:
title: Bearer Token
type: string
steps:
- id: create-window-vm
name: Create Windows Virtual Machine
action: vm:createAzureWindowsVm
input:
vmName: ${{ parameters.vmName }}
resourceGroupName: ${{ parameters.resourceGroupName }}
location: ${{ parameters.location }}
adminUserName: ${{ parameters.adminUserName }}
adminPassword: ${{ parameters.adminPassword }}
osVersion: ${{ parameters.osVersion }}
vmSize: ${{ parameters.vmSize }}
bearerToken: ${{ parameters.bearerToken }}
- id: print-working-directory
name: Print Working Directory
action: shell:script
input:
script: |
echo "Current Working Directory:"
pwd
echo "Environment Variables:"
env
- id: list-files
name: List Files
action: shell:script
input:
script: ls -la file