resources:
- name: {{ properties['prefix'] }}-tmp-instance
  properties:
    disks:
    - autoDelete: false
      boot: true
      deviceName: persistent-disk-0
      index: 0
      interface: SCSI
      mode: READ_WRITE
      type: PERSISTENT
      initializeParams:
        sourceImage: {{ properties['source_family'] }}
        diskSizeGb: 10
        diskType: zones/{{ properties['zone'] }}/diskTypes/pd-ssd
    machineType: zones/{{ properties['zone'] }}/machineTypes/n1-standard-1
    metadata: {}
    networkInterfaces:
    - accessConfigs:
      - name: external-nat
        type: ONE_TO_ONE_NAT
      name: nic0
      network: projects/{{env['project']}}/global/networks/{{ properties['prefix'] }}-network
      {% if properties['gce_vpc_custom_subnet_cidr'] %}
      subnetwork: projects/{{env['project']}}/regions/{{ properties['region'] }}/subnetworks/{{ properties['prefix'] }}-{{ properties['region'] }}-subnet
      {% endif %}
    scheduling:
      automaticRestart: true
      onHostMaintenance: MIGRATE
      preemptible: false
    tags:
      items:
      - {{ properties['prefix'] }}-ssh-external
    zone: {{ properties['zone'] }}
  type: compute.v1.instance
