-
Notifications
You must be signed in to change notification settings - Fork 11
/
vm.jinja
30 lines (29 loc) · 1.03 KB
/
vm.jinja
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
resources:
- type: compute.v1.address
name: {{ env["deployment"] }}-address
properties:
region: {{ properties["region"] }}
- type: compute.v1.instance
name: {{ env["deployment"] }}-vm
properties:
zone: {{ properties["zone"] }}
machineType: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/machineTypes/{{properties["vmtype"]}}
metadata:
items:
- key: startup-script
value: |
{{ properties["startup-script"]|indent(10) }}
disks:
- deviceName: boot
type: PERSISTENT
boot: true
autoDelete: true
initializeParams:
sourceImage: projects/ubuntu-os-cloud/global/images/family/{{properties["linuxType"]}}
diskSizeGb: {{properties["diskSizeGb"]}}
networkInterfaces:
- network: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/global/networks/default
accessConfigs:
- name: External
type: ONE_TO_ONE_NAT
natIP: $(ref.{{ env["deployment"] }}-address.address)