(unused_context)
return {'resources': resources}
Creates the second virtual machine.
Creates the second virtual machine.
Creates the second virtual machine .
def GenerateConfig(unused_context):
  """Creates the second virtual machine."""

  resources = [{
      'name': 'the-second-vm',
      'type': 'compute.v1.instance',
      'properties': {
          'zone': 'us-central1-f',
          'machineType': ''.join([COMPUTE_URL_BASE, 'projects/MY_PROJECT',
                                  '/zones/us-central1-f/',
                                  'machineTypes/g1-small']),
          'disks': [{
              'deviceName': 'boot',
              'type': 'PERSISTENT',
              'boot': True,
              'autoDelete': True,
              'initializeParams': {
                  'sourceImage': ''.join([COMPUTE_URL_BASE, 'projects/',
                                          'debian-cloud/global',
                                          '/images/family/debian-9'])
              }
          }],
          'networkInterfaces': [{
              'network': '$(ref.a-new-network.selfLink)',
              'accessConfigs': [{
                  'name': 'External NAT',
                  'type': 'ONE_TO_ONE_NAT'
              }]
          }]
      }
  }]
  return {'resources': resources}
def GenerateConfig ( unused_context ) : resources = [ { 'name' : 'the-second-vm' , 'type' : 'compute.v1.instance' , 'properties' : { 'zone' : 'us-central1-f' , 'machineType' : '' . join ( [ COMPUTE_URL_BASE , 'projects/MY_PROJECT' , '/zones/us-central1-f/' , 'machineTypes/g1-small' ] ) , 'disks' : [ { 'deviceName' : 'boot' , 'type' : 'PERSISTENT' , 'boot' : True , 'autoDelete' : True , 'initializeParams' : { 'sourceImage' : '' . join ( [ COMPUTE_URL_BASE , 'projects/' , 'debian-cloud/global' , '/images/family/debian-9' ] ) } } ] , 'networkInterfaces' : [ { 'network' : '$(ref.a-new-network.selfLink)' , 'accessConfigs' : [ { 'name' : 'External NAT' , 'type' : 'ONE_TO_ONE_NAT' } ] } ] } } ] return { 'resources' : resources }