Skip to content

Instantly share code, notes, and snippets.

@bdurrow
Created June 16, 2017 15:37
Show Gist options
  • Save bdurrow/0b0dd3b74d7120b546d1a4dc1bc09f0c to your computer and use it in GitHub Desktop.
Save bdurrow/0b0dd3b74d7120b546d1a4dc1bc09f0c to your computer and use it in GitHub Desktop.
resources:
- name: {{ properties['prefix'] }}-disktest
properties:
disks:
- autoDelete: true
boot: true
deviceName: persistent-disk-0
index: 0
interface: SCSI
mode: READ_WRITE
type: PERSISTENT
initializeParams:
sourceImage: global/images/family/{{ properties['gold_image'] }}
diskSizeGb: {{ properties['bastion_disk_size'] }}
diskType: zones/{{ properties['zone'] }}/diskTypes/pd-ssd
- name: foo-
autoDelete: true
boot: false
deviceName: persistent-disk-docker
index: 1
interface: SCSI
mode: READ_WRITE
type: PERSISTENT
initializeParams:
#This should be a blank disk
sourceImage: global/images/family/{{ properties['gold_image'] }}
diskSizeGb: {{ properties['bastion_disk_size'] }}
diskType: zones/{{ properties['zone'] }}/diskTypes/pd-ssd
machineType: zones/{{ properties['zone'] }}/machineTypes/{{ properties['bastion_machine_type'] }}
metadata: {}
networkInterfaces:
- accessConfigs:
- name: external-nat
type: ONE_TO_ONE_NAT
name: nic0
network: projects/{{env['project']}}/global/networks/{{ properties['prefix'] }}-network
subnetwork: projects/{{env['project']}}/regions/{{ properties['region'] }}/subnetworks/{{ properties['prefix'] }}-{{ properties['region'] }}-subnet
scheduling:
automaticRestart: true
onHostMaintenance: MIGRATE
preemptible: false
serviceAccounts:
- scopes:
- https://www.googleapis.com/auth/cloud.useraccounts.readonly
- https://www.googleapis.com/auth/compute
- https://www.googleapis.com/auth/devstorage.read_write
- https://www.googleapis.com/auth/logging.write
- https://www.googleapis.com/auth/monitoring.write
- https://www.googleapis.com/auth/service.management.readonly
- https://www.googleapis.com/auth/servicecontrol
tags:
items:
- {{ properties['prefix'] }}-bastion
- {{ properties['prefix'] }}-ssh-external
zone: {{ properties['zone'] }}
type: compute.v1.instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment