Complete the code to specify the type of resource in Deployment Manager.
resources:
- name: my-vm
type: [1]The type field defines the resource type. For a VM instance, use compute.v1.instance.
Complete the code to set the machine type for the VM instance.
resources:
- name: my-vm
type: compute.v1.instance
properties:
zone: us-central1-a
machineType: [1]The machineType property requires the full path including zone and machine type name.
Fix the error in the YAML to correctly define the disk size property.
resources:
- name: my-vm
type: compute.v1.instance
properties:
disks:
- deviceName: boot
type: PERSISTENT
boot: true
autoDelete: true
initializeParams:
diskSizeGb: [1]The diskSizeGb property expects an integer value without quotes or units.
Fill both blanks to define a firewall rule allowing TCP port 80.
resources:
- name: allow-http
type: compute.v1.firewall
properties:
network: [1]
allowed:
- IPProtocol: [2]
ports:
- '80'The network property needs the full path to the default network. The IPProtocol for HTTP is tcp.
Fill all three blanks to create a metadata entry with key 'startup-script' and a simple echo command.
resources:
- name: my-vm
type: compute.v1.instance
properties:
metadata:
items:
- key: [1]
value: [2]
- key: [3]
value: 'ignored'The metadata key for startup scripts is startup-script. The value is a bash script string. The second key is shutdown-script as an example.