(context)
return {'resources': resources}
Creates the virtual machine with environment variables.
Creates the virtual machine with environment variables.
Creates the virtual machine with environment variables .
def GenerateConfig(context):
  """Creates the virtual machine with environment variables."""

  resources = [{
      # `the-first-vm` is replaced with `context.env[`name`]`
      'name': context.env['name'],
      'type': 'compute.v1.instance',
      'properties': {
          # All occurrences of `us-central1-f` are replaced with
          # `context.properties[`zone`]. 
          # All occurrences of the project ID are replaced with 
          # `context.env[`project`]`.
          # `f1-micro` is replaced with `context.properties["machineType"].  
          'zone': context.properties['zone'],
          'machineType': ''.join([COMPUTE_URL_BASE, 'projects/',
                                  context.env['project'], '/zones/',
                                  context.properties['zone'], '/machineTypes/',
                                  context.properties['machineType']]),
          'disks': [{
              'deviceName': 'boot',
              'type': 'PERSISTENT',
              'boot': True,
              'autoDelete': True,
              'initializeParams': {
                  'sourceImage': ''.join([COMPUTE_URL_BASE, 'projects/',
                                          'debian-cloud/global/',
                                          'images/family/debian-9'])
              }
          }],
          # `$(ref.a-new-network.selfLink)` is replaced with 
          # `$(ref.` + context.properties[`network`] + `selfLink)`.
          'networkInterfaces': [{
              'network': '$(ref.' + context.properties['network']
                         + '.selfLink)',
              'accessConfigs': [{
                  'name': 'External NAT',
                  'type': 'ONE_TO_ONE_NAT'
              }]
          }]
      }
  }]
  return {'resources': resources}
def GenerateConfig ( context ) : resources = [ { # `the-first-vm` is replaced with `context.env[`name`]` 'name' : context . env [ 'name' ] , 'type' : 'compute.v1.instance' , 'properties' : { # All occurrences of `us-central1-f` are replaced with # `context.properties[`zone`].  # All occurrences of the project ID are replaced with  # `context.env[`project`]`. # `f1-micro` is replaced with `context.properties["machineType"].   'zone' : context . properties [ 'zone' ] , 'machineType' : '' . join ( [ COMPUTE_URL_BASE , 'projects/' , context . env [ 'project' ] , '/zones/' , context . properties [ 'zone' ] , '/machineTypes/' , context . properties [ 'machineType' ] ] ) , 'disks' : [ { 'deviceName' : 'boot' , 'type' : 'PERSISTENT' , 'boot' : True , 'autoDelete' : True , 'initializeParams' : { 'sourceImage' : '' . join ( [ COMPUTE_URL_BASE , 'projects/' , 'debian-cloud/global/' , 'images/family/debian-9' ] ) } } ] , # `$(ref.a-new-network.selfLink)` is replaced with  # `$(ref.` + context.properties[`network`] + `selfLink)`. 'networkInterfaces' : [ { 'network' : '$(ref.' + context . properties [ 'network' ] + '.selfLink)' , 'accessConfigs' : [ { 'name' : 'External NAT' , 'type' : 'ONE_TO_ONE_NAT' } ] } ] } } ] return { 'resources' : resources }