(context)
return {
      'resources': resources,
      'outputs': [{
          'name': 'address',
          'value': '$(ref.' + lb_name + '.address)'
      }]
  }
Generate configuration.
Generate configuration.
Generate configuration .
def GenerateConfig(context):
  """Generate configuration."""

  lb_name = ''.join([context.env['deployment'],
                     '-',
                     context.env['name'],
                     '-internal-lb'])

  metadata = {
      'algorithm': context.properties['algorithm'],
      'app-port': context.properties['app-port'],
      'port': context.properties['port'],
      'groups': ' '.join(context.properties['groups'])
  }

  resources = [{
      'name': lb_name,
      'type': 'instance.py',
      'properties': {
          'machine-type': context.properties['machine-type'],
          'metadata': metadata,
          'startup-script': 'haproxy-startup-script.sh',
          'zone': context.properties['zone']
      }
  }]

  return {
      'resources': resources,
      'outputs': [{
          'name': 'address',
          'value': '$(ref.' + lb_name + '.address)'
      }]
  }
def GenerateConfig ( context ) : lb_name = '' . join ( [ context . env [ 'deployment' ] , '-' , context . env [ 'name' ] , '-internal-lb' ] ) metadata = { 'algorithm' : context . properties [ 'algorithm' ] , 'app-port' : context . properties [ 'app-port' ] , 'port' : context . properties [ 'port' ] , 'groups' : ' ' . join ( context . properties [ 'groups' ] ) } resources = [ { 'name' : lb_name , 'type' : 'instance.py' , 'properties' : { 'machine-type' : context . properties [ 'machine-type' ] , 'metadata' : metadata , 'startup-script' : 'haproxy-startup-script.sh' , 'zone' : context . properties [ 'zone' ] } } ] return { 'resources' : resources , 'outputs' : [ { 'name' : 'address' , 'value' : '$(ref.' + lb_name + '.address)' } ] }